wood burning stoves*
The moose likes Beginning Java and the fly likes Quick question on Applet GUI not showing up Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Quick question on Applet GUI not showing up" Watch "Quick question on Applet GUI not showing up" New topic
Author

Quick question on Applet GUI not showing up

David Crossett
Ranch Hand

Joined: Feb 05, 2003
Posts: 102
Every once in awhile when creating applets, my GUI components don't show up. The last time this happened, I just created a layout manager (FlowLayout) and things worked. But my code is identical and when I run it, nothing shows up. What am I missing?

thanks!


David Crossett
-nothing important to say, but learnin' plenty-
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34


The default implementation of paint() is responsible for rendering the entire visual appearance of the applet and all its component children. You've overridden it to do precisely nothing, instead. While this will certainly help performance some, and, as you've noted, it has a certain Zen esthetic to it , if you want the components to actually appear, you ought to remove that paint() override altogether.


[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Quick question on Applet GUI not showing up
 
Similar Threads
printing an 2d array by row
Returning a boolean value
Changing an arrays size
Can't resolve compiler error message
StringTokenizer