This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Getting blank screen in Swing Aplication 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 » Swing / AWT / SWT
Bookmark "Getting blank screen in Swing Aplication" Watch "Getting blank screen in Swing Aplication" New topic
Author

Getting blank screen in Swing Aplication

Renjith mohanan
Ranch Hand

Joined: Jun 19, 2009
Posts: 52
Hi All,
I am developing a swing application, in which I have JFrame and this JFrame contains many panels and each panel contains JTables and JButtons, and JLabels and I applied TableCellRenderer to the each of the column of JTables.
But when I returns to this page from some other pages, I am getting a blank screen, and when I move my mouse over the JButtons or JTable, the page is displaying.

I don't know, what is the problem.

If any one had this problem before, please let me know, how you solved it or please provide me what all may be the reason behind it ?

Thanks In Advance

Renjith M


Personal E-mail: kalliyoorrenjith@gmail.com
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10167
    
    8

This almost always is caused because you are not switching the panels properly.

You got two options
1) Use card layout
2) User parent.add and also call revalidate and repaint after the add call.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting blank screen in Swing Aplication
 
Similar Threads
Print multiple Jtable contents in one page
JInternalFrames
User Interface
jinternalframes
Swing Components - User Interface