This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How to reset JPanel in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
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: 4523
    
    5

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: 19651
    
  18

What have you tried so far?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to reset JPanel in java
 
Similar Threads
adding a window to a container
Buttons don't work
JFrame question.
How to retain the values after page refresh.
Help sorting out what combination of layouts will provide the result I need