• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Getting blank screen in Swing Aplication

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
And inside of my fortune cookie was this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic