It's not a secret anymore!
The moose likes Swing / AWT / SWT and the fly likes How to reset JPanel in java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "How to reset JPanel in java" Watch "How to reset JPanel in java" New topic
Author

How to reset JPanel in java

pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
How to reset JPanel and JTabedPane in java??? Can anyone help
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4163
    
    3

What does it mean to you to 'reset' a JPanel or a JTabbedPane?


luck, db
There are no new questions, but there may be new answers.
pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
When i click on button..... tabs are created with JPanel..tabs values are taken from database......When i click on button for 2nd time all contents from jpanel should clear and new values should be uploaded
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

What have you tried so far?


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
pooja prabhu
Ranch Hand

Joined: Sep 23, 2012
Posts: 33
I have tried JPanel.removeAll(); Jpanel.revalidate and JPanel.repaint
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
Why would you remove the components that
display the db values?

change the text for labels/textfields etc.
or change the model for tables/comboBoxes etc.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel
 
subject: How to reset JPanel in java
 
Similar Threads
Help sorting out what combination of layouts will provide the result I need
Buttons don't work
adding a window to a container
JFrame question.
How to retain the values after page refresh.