Results 1 to 2 of 2
  1. #1
    VineetKumar is offline Member
    Join Date
    Nov 2008
    Rep Power

    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 ............

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    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.

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts