Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-20-2008, 07:44 PM
Member
 
Join Date: Nov 2008
Posts: 3
Rep Power: 0
VineetKumar is on a distinguished road
Smile refresh view of Jpanel
hot to refresh the view of a jpanel.

I am adding some components to a jpanel and when i try to remove them using removeAll() and then if I add some other components it is just overwriting. It is not clearing the previous view.......

Plz help me ............
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-21-2008, 02:49 AM
Fubarable's Avatar
Moderator
 
Join Date: Jun 2008
Posts: 6,492
Rep Power: 8
Fubarable is on a distinguished road
Default
You have to call revalidate and repaint on the JPanel after changing JComponents. Better still would be to use a CardLayout manager to just swap JPanels.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating a view using actions in a seperate view xcallmejudasx Eclipse 0 10-24-2008 10:24 PM
Jpanel won't refresh alon2580 AWT / Swing 3 08-22-2008 06:26 PM
Can't refresh a JPanel/text nickbeacroft AWT / Swing 8 06-23-2008 06:23 PM
refresh JPanel olesja AWT / Swing 1 04-16-2008 04:58 PM
Refresh session cachi JavaServer Pages (JSP) and JSTL 1 08-07-2007 08:52 AM


All times are GMT +2. The time now is 07:48 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org