This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet wont load... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet wont load..." Watch "Applet wont load..." New topic
Author

Applet wont load...

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802





after i use the <applet></applet> tags in html this applet wont display
the circles and SHA..

why not?


Thanks,

Justin

p.s i have a CircleListener as you can see, but its commented out cause it creates a second class. in the applet code, how do i set the code value equal to more than one class file?


You down with OOP? Yeah you know me!
Adam Nace
Ranch Hand

Joined: Jul 17, 2006
Posts: 117
Looks like it ought to display something. Are you sure its the applet thats the problem, or is it possible that the applet isn't loading at all.

i.e., is the button being displayed?

- Adam
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
well i have another applet that is just a big JScrollPane, and that displays. But this one won't, im stuck.

Justin Fox
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
Is the paint method being called?


Ping & DNS - my free Android networking tools app
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
you dont have to call it in the init() do you? i never do in any other applications...


Justin Fox
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41149
    
  45
No, your code doesn't have to call it, because someone does, and that's not going to happen when using Swing (as JApplet does). Swing wants you to use the paintComponent method instead. Have your previous applets possibly all been based on Applet (as opposed to JApplet)?
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
umm it works now, i updated my java plugin stuff for my browser.
but i have to use paint() in JApplet, it doesnt recognize paintComponent when you're using JApplet, only if you use JPanel.

Justin
 
Consider Paul's rocket mass heater.
 
subject: Applet wont load...
 
Similar Threads
for loop in paint method........
Inheritance problem
a Jbutton with a rounded border
slowing down movement in an applet.... doesn't have anything to do with the applet.
Moving an object such as an arc.