This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Applets and the fly likes Applet starts but only shows white screen Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Applets
Bookmark "Applet starts but only shows white screen" Watch "Applet starts but only shows white screen" New topic
Author

Applet starts but only shows white screen

jeff krystyan
Greenhorn

Joined: Apr 02, 2012
Posts: 9
hey all, trying to figure out something...

my program will compile fine and the applet will start but the appletviewer itself only shows up as a white screen. Can you help?

I'm using textpad. Here's the code. I didn't notate it but it is just a practice code to demonstrate key events. The program moves a square to the right.



Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
If you're using Swing components, then the class should extend JApplet, not Applet (which is for AWT applets).

Also, the main method is used by applications, not by applets. Move the code that's in there into the init method.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet starts but only shows white screen
 
jQuery in Action, 3rd edition