Help

J

jonnybravo

how do you completly remove a JTree from a panel inorder for a new one to
be created later
 
T

Thomas Weidenfeller

jonnybravo said:
how do you completly remove a JTree from a panel inorder for a new one to
be created later

Remove the component from the container (the panel) and revalidate. But
are you sure this is what you want?
 
C

Christophe Vanfleteren

jonnybravo said:
how do you completly remove a JTree from a panel inorder for a new one to
be created later

panel.remove(myJTree);

As an aside, a sentence should start with a capital and end with a point.
You should try that sometimes.

Also, these kinds of questions are better suited for c.l.j.gui.
And pick a better subject next time. When you post here, it is prety much a
given you need help with something.
 
R

Roedy Green

how do you completly remove a JTree from a panel inorder for a new one to
be created later
remove/add. But setVisible(false) and then change the model and
setVisible(true) would likely be faster.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top