This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jpanel not displayed without minimizing JFrame

 
Karnati Sudhakar
Ranch Hand
Posts: 270
Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


When i select the radio button from the menu item ..i had to minimize and maximize the frame to see the label which is added to the panel.Please help me what is wrong? Something really missing..

Regards
Sudhakar
[ December 12, 2008: Message edited by: Karnati Sudhakar ]
 
Rob Spoor
Sheriff
Pie
Posts: 20393
46
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try calling revalidate() and/or repaint().
 
Josh Britton
Greenhorn
Posts: 24
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A couple ideas:

First, the size of your JFrame is BIG: could it be that the label is showing on a part of the frame that is off-screen?

Second, call validate on the JFrame after you add the panel:



Third, you shouldn't need to set the panel's visibility.

Last, don't forget to launch your JFrame using EventQueue.invokeLater:



Regards,

josh
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic