This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Refresh a frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Refresh a frame" Watch "Refresh a frame" New topic

Refresh a frame

Jesse Walker
Ranch Hand

Joined: Aug 18, 2004
Posts: 50
I am trying to use a checkbox that once it is selected, that it will add a component to the frame do I need to use paint and repaint/update or is there another way??
Thank you
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Brian Cole
Ranch Hand

Joined: Sep 20, 2005
Posts: 862
Call revalidate() on the JPanel after you have added the new component.

bitguru blog
I agree. Here's the link:
subject: Refresh a frame
Similar Threads
extends Frame help
Not able to capture Logout
applet in frame
frame properties
Size of JScrollPane in a JPanel