aspose file tools*
The moose likes Applets and the fly likes problem in adding the panel to an applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "problem in adding the panel to an applet" Watch "problem in adding the panel to an applet" New topic
Author

problem in adding the panel to an applet

smyle khanna
Ranch Hand

Joined: Jan 14, 2004
Posts: 54
hi,
i have been tryin to add the panel to an applet n its givin certain runtime exceptions,n also i have addded a counter 2 count the time which isnt workin.
the runtime exceptions are:
java.lang.ClassCastException:StartupApplet1
at sun.applet.AppletPanel.createApplet(AppletPanel.java.586)
at sun.applet.AppletPanel.runLoader(AppletPanel.java.515)
at sun.applet.AppletPanel.run(AppletPanel.java.293)
at java.lang.Thread.run(Thread.java.:484)
the program code is given below,[not completed]
plz tell me as 2 wht i have 2 use 2 make it work,
thanks in advance,
Smyle
Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 157
Hello,
I could not understand that your class StartupApplet1 should habe been exentded with Applet class and I have noticed that you not have done this and how are you calling this applet.
Please see your code once again.
jasmine


jasmine kaur
Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 157
reason of class cast exception is that you have not extended your calss with applet class thats why you are getting this exception .Please extend your calss with applet .
Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem in adding the panel to an applet
 
Similar Threads
positioning of components w/o using layout managers
Problem with closing n reloading an applet
JPanel on JScrollBar possible?
GridBag Problem (Replacing Component)
One error in code..not understanding what it tells me. Code works it is on line 55.