How to create an applet within an application?
Hi. Im trying to make an applet work within a main application but I cant get it to work because then I have 2 of these and it gives me an error:
public class java_tester extends JFrame implements MouseListener //MAIN APPLICATION
public class MusicPlay extends JApplet //APPLET
I cant have both if them because it is like two different programs.
Can anyone help me with this?
Thanks
ProGenius wrote:
But when I put public class MusicPlay extends JApplet it underlines it because the name of the main program is different and when I give it the same name it still underlines it. I know it probably is easy to do it but I really dont know how to make it work.
Thanks a lot for your helpWhat is "it", what is "it" underlining, and why is this a problem? There's no such concept as "main program". If you're confused by the presence of two whole classes, don't be. Anything beyond the laughably trivial will consist of several classes.
Similar Messages
-
How to create the user on Internet Application Server(IAS) control console
Hi All,
My Client is asking me for How to create the user on Internet Application Server(IAS) control console 10.1.2( 10g release 2).
If anyone have the document for How to Create the User on Internet Application Server (IAS) console 10g release 2 , then please send me the document and help me out from this Concern.
Regards,
Yadav@intelli.
Edited by: 851080 on Apr 8, 2011 6:31 PMAre you using OID? Can you provide more details about your iAS environment?
-
How to create a account key for application type M ?
Hi Guys,
How to create a account key for application type M ? and link the same with
Gl account.
thanks.Hi
Please create the account keys or transaction keys in
SPRO-> IMG-> MM-> Purchasing-> Conditions-> Define Price Determination Process-> Define Transaction/Event Keys
Thanks & Regards
Kishore -
How to create an applet that shows a pdf as non-editable.
Hi friends,
Does any one know how to create an applet that shows a pdf document (should make that pdf a non-editable one) while clicking a link.Its urgent for me as I have to complete this one tomorrow itself...please help me...
I am able to view the pdf document but that cannot be make a non-editable one.
Can anyone gave me the code for that one....please I am not very much good in Java.PDF is a proprietary format and Java doesn't support it by default. Are you using a 3rd party tool to create the PDF? If so, you need to review the developer docs to see how to make the document non-editable. Frankly, I don't see why you're using an Applet to view a PDF in the first place. What exactly are you trying to do. I'm confused.
-
Creating an Applet from an Application
So i'm developing my own version of the '80s Space Invader game for class, and one of the requirments is that we have to turn in an application, but also post an Applet version on a website. The game is pretty much done, but I am having trouble creating the Applet from the Application. I've done most of the stuff that i thought you were supposed to do. The thing is, it will run whenever i use the appletviewer from the dos prompt just like it does when i'm running the application. However, when Ii try to view it in an actuall explorer window, it wont load.
The way the program was designed, it had a "SpaceInvaders" class that had the main method, which only had about 4 lines. Then i had a DrawFrame class that extended JFrame, and that had the bulk of the code in it. The main method of the SpaceInvaders class had a "DrawFrame frame = new DrawFrame();" statement, and then a couple set.whatever statements. to change it to an applet, i just commented out the whole of the SpaceInvaders class, then i renamed the DrawFrame class to "public class SpaceInvaders extends JApplet" changed the consructor to the "init()" method, and commented out the setSize and setTitle statements, and also i imported java.applet.*;
when i try to run the html file in firefox, all i get is the frame with a little red 'X' in it, and at the bottom it says "Applet SpaceInvaders notinited"
any help, ideas, or tips would be greately appreciated. Thanks in advance, and if you need any more info, let me know.i created a very simple applet:
import java.applet.*;
import java.awt.*;
* The HelloWorld class implements an applet that
* simply displays "Hello World!".
public class HelloWorld extends Applet {
public void paint(Graphics g) {
// Display "Hello World!"
g.drawString("Hello world!", 50, 25);
}and it ran just fine inside of a browser. I've also ran other applets that should be very similar to mine, but still mine doesn't work. -
How to create an export of APEX application with DB?
How to create the common script of Application an Data Base?
What is the best way to make an update of my application on host machine, if I develope my application in personal one?
Regards, KostyaThanx for your reply's
If I understand the tutorial correctly I should do
something like this to start the map:
Map<String, myClass> myMAP = new HashMap<String,
MyClass>();
and something like this to add a new instance of the
class every time:
myMAP.put(myString, new myClass());
So this would result a link between the Strings and
the instance of the Class?
Thanks
Message was edited by:
JasperLevinkyep. the String is the key, and the MyClass instance is the value. to get the value out of the map, use map.get(key) -
How to create a file under web application root from java program
how to create a file under web application root from java program like an action class?
like an action class?Huh? What exactly is your requirement?
Creating a file is usually done with java.io API. Read the java.io tutorials how to play with files. -
How to create installation scripts in packaged application
can u tel me How to create installation scripts for packaged application.
also tell me , i have to first install scripts and then supporting objects or
supporting objects first then installation scripts..Hi,
Depending upon your usecase there are different ways to implement this logic.
Check this for example (Read my answer in this post):
https://forums.sdn.sap.com/thread.jspa?threadID=349151
Also check these senarios:
http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm
Also the delegation may be interesting for you:
http://help.sap.com/saphelp_nw70/helpdata/en/a0/44b742cafec96ae10000000a155106/frameset.htm
Greetings,
Praveen Gudapati -
Hi all, May i know how to create filters in Hyperion Planning Application?
Hi all, May i know how to create filters in Hyperion Planning Application?
i don't know how to create filters in Planning Application. but my superior asking me to create filters.
Thanks & Regards,
SekharGo to Administration > Dimensions > Select Dimension > Select the member to want to assign acccess filters to :- Assign Access
Repeat process for all access permissions.
If there is a lot of permissions to set you could use a utility :-http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_admin/ch03s07.html
Refresh Planning including security filters
Also have a read of :- http://download.oracle.com/docs/cd/E12825_01/epm.111/hp_admin/mg_secfilter.html
Cheers
John
http://john-goodwin.blogspot.com/ -
How to create and delete an Endeca application in Windows
HI,
can you please help me in ,
how to create and delete an Endeca application inWindows machine not in Linux Machine.
Thanks.....Hi,
Steps to create an Endeca Application are clearly given in Getting Started Guide.
http://docs.oracle.com/cd/E38680_01/Common.311/pdf/GettingStarted.pdf (Chapter 6 : Deploying a Reference Application)
If you want to create an endeca application so as to integrate with Product Catalog system such as ATG using ATG 10.1.1 or above , then create an endeca application using the discover-data-catalog-integration reference application. Steps for doing this are documented in ProductCatalogDTGuide
http://docs.oracle.com/cd/E38679_01/ToolsAndFrameworks.311/pdf/ProductCatalogDTGuide.pdf (Deploying the Product Catalog Application)
To delete an Endeca Application that you have created in Windows/linux
1. Navigate to the control directory of the application that you want to remove and execute the script
runCommand.bat --remove-app (Removes the provisioning information with EAC admin console)
2. Remove the instance configuration files for the application using the emgr_update command line utility
emgr_update.bat host localhost:8006 app_name My_app action remove_all_settings prefix My_prefix
3. You can then explicitly delete the directory in the Endeca_apps directory where you have initially created your application.
If you are using discover-data-catalog-integration, you can remove the CAS Record Store Instances by navigating to CAS/bin directory and executing
./component-manager-cmd.sh delete-component -n {YOUR_APP_RECORD_STORE_NAME}
Thanks,
Shabari -
How to create signed applet and make it work with browser
i hav an applet that needs to write a file to onto local system resource. i came to know that the applet needs to be signed. so i searched some guides to create a signed applet but most of them specify how to use it with applet viewer and not on a browser. plz help me with how to sign an applet and and allow it to write a file from within a browser.
On linux, something like this:
keytool -genkey -alias signSocket -keystore socketstore -keypass abc123 -dname "cn=your name" -storepass abc123
jar cvf Socket.jar *.class
jarsigner -keystore socketstore -storepass abc123 -keypass abc123 -signedjar SSocket.jar Socket.jar signSocket
And in html:
CODE = "YourClass.class"
ARCHIVE = "SSocket.jar"
... -
What is lightweight and heavyweight ? how to create my applet lightweight?
Sir ,
t have created an applet and in that i have not use any component
for drawing now i want to use component for applet but cant grtting how to do this , by reference of sun java i have found this code for application to create lightweight::
import java.awt.*;
import java.awt.event.*;
* Silly Sample program which demonstrates the basic paint
* callback mechanism in the AWT.
public class test1{
public static void main(String[] args) {
Frame f = new Frame("Have a nice day!");
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
f.add(new SmileyCanvas(Color.yellow), BorderLayout.CENTER);
f.pack();
f.show();
* A canvas which renders a smiley-face to the screen
* Note: Canvas is a heavyweight superclass, which makes
* SmileyCanvas also heavyweight. To convert this class to
* a lightweight, change "extends Canvas" to "extends Component".
class SmileyCanvas extends Canvas {
public SmileyCanvas(Color faceColor) {
setForeground(faceColor);
public Dimension getPreferredSize() {
return new Dimension(300,300);
* Paint when the AWT tells us to...
public void paint(Graphics g) {
// Dynamically calculate size information
// (the canvas may have been resized externally...)
Dimension size = getSize();
int d = Math.min(size.width, size.height); // diameter
int ed = d/20; // eye diameter
int x = (size.width - d)/2;
int y = (size.height - d)/2;
// draw head (color already set to foreground)
g.fillOval(x, y, d, d);
g.setColor(Color.black);
g.drawOval(x, y, d, d);
// draw eyes
g.fillOval(x+d/3-(ed/2), y+d/3-(ed/2), ed, ed);
g.fillOval(x+(2*(d/3))-(ed/2), y+d/3-(ed/2), ed, ed);
//draw mouth
g.drawArc(x+d/4, y+2*(d/5), d/2, d/3, 0, -180);
this code is not for applet so how to make this code for applet ?I use the Snippets folder to store re-usable code. Scroll to
the file or
folder desired, double click and voila! Code is inserted into
the page.
As for the other bells & whistles, you are probably
thinking about DW
Extensions (.mxp) files. There are many 3rd party makers of
extensions.
Some are free, some cost a nominal fee. Check around to see
if what you
want isn't already available. If not, read this article.
Creating an Extension:
http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f508c8d e-7fde.html
Nancy O.
Alt-Web Design & Publishing
www.alt-web.com -
How to create multiple objects within a class
I have a item.lvclass which has an item.ctl (contains a cluster of class private data). I need to add another object (item2.ctl) within that same class so that I can reuse the code for that class.
So how do you create additional objects within the same class?Well... right now... I've cornered myself going down this path: http://forums.ni.com/t5/LabVIEW-Idea-Exchange/LVOOP-Interfaces/idc-p/1314637#M8918
Seems like the solution in the idea was not implemented yet....
Okay. I will try to describe the situation differently...
Let's say I have a Car.lvclass
I want to have two objects: sedan & roadster
both have similar properties, but also have different properties:
4 doors vs 2 doors
hardtop vs convertible
silver vs white (color)
I want the two objects to be of the same class so that they can share the same private and public VI's. As a matter of fact, I want to have both objects in the VI's within the Car.lvclass. -
How to create a servlet in PAR Application
Hi Experts,
I want to create a servlet in PAR application. This servlet should be capable of accessing the functions of other java files included in PAR Application. Servlet should be capable of accessing the functions say doContent(req, resp) of any class of PAR application.
Is it possible to create Servlet in PAR application?
I created one servlet but unable to declare its information in Deployment Descriptor.
Because the deployment which is provide ie portalapp.xml doesnt allow us to write tags like <servlet-name>, <servlet-mapping>, <url-pattern> etc. These are necessary for declaration of servlet.
So how can i write a complete working Servlet under PAR application?
Please help and replies will be appreciated.Hi,
Depending upon your usecase there are different ways to implement this logic.
Check this for example (Read my answer in this post):
https://forums.sdn.sap.com/thread.jspa?threadID=349151
Also check these senarios:
http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/42/9ddcc9bb211d72e10000000a1553f6/frameset.htm
Also the delegation may be interesting for you:
http://help.sap.com/saphelp_nw70/helpdata/en/a0/44b742cafec96ae10000000a155106/frameset.htm
Greetings,
Praveen Gudapati -
How to Create Listbox in a JSP Application
Hi.
I'm new to JDeveloper. Can someone show me how to create a Listbox (that gets it's values from a database table) in a *.jsp form? This listbox is linked to a database table field. I'm not using BC4J nor EJB. I've created a JSP application with ADF using a Model1 (or MVC pattern) architecture -- which I based on the JDeveloper10i tutorial (http://otn.oracle.com/obe/obe9051jdev/ADFmodel1/ADFmodel1.htm). I've tried using render on the field in the view object entity, refresh the Data Control Palette and then drag the table view entity to a *.jsp page as input form. But I can't see the field in the form being displayed as a list box.
Please help.
thanks,
christinaHi Shay.
Thanks for the quick reply. Sorry for the misuderstanding but I have no clue on terminology used in JDeveloper. The "view object" entity I was referring to is the "<TableName>View" view object (e.g. EmpView) under the Model->Application Sources->Mypackage folder where the "<TableName>" entity object file also resides. I think I'm using the Business Component bec. I have this step in the tutorial that I based my application on.
I have trouble following the tutorial link you gave me (for the ADF Business Component Popup list) bec. when I select the table field in the "Data Control Palette" Panel, the only values I see in the "Drag and Drop As" poplist are "Value","Label","RenderValue" and "Input Render". I can't see the type "Single Select List". Do you why is that?
thanks,
christina
Maybe you are looking for
-
Can I retain just the "Latest" for a single complete backup?
I want to delete some older TM backups from my external drive to make room. It's filled up because I used TM with one computer, then added a laptop and TM started backing that up on the same external drive, then just got a new computer and TM started
-
HT204406 How do I access greyed out songs on the ipod touch after subscribing to iTunes Match?
I have just subscribed to iTunes March and now I cannot access my songs on the iPod Touch. The songs can be seen but are greyed out. ANyone know what I need to do?
-
Include multiple sub-interfaces in Cisco ASA for VPN tunnel
I am trying to create a VPN tunnel between two Cisco ASAs where one ASA has multiple sub-interfaces. Say, In Cisco ASA 5550(in datacentre), I created multiple subinterfaces with VLAN ID as below: Inside, int0/1 : 10.1.1.0/24 DMZ, int0/1.100: 10.1.100
-
Finder suddenly appears as Totalfinder and is not working
Finder on my Macbook Air suddently turned into Totalfinder one day. I do not know how this happened. It is now causing problems to my computer and is often not opening. It also tells me that it is not registered, but I do not recall ever installin
-
Traveling with Macbook to China
Hi, I am about to head off to China with my beautiful Macbook. Is there anything else I need other than a small travel adapter? I don't want to plug it in out there and watch it blow up. Thanks in advance Cam