How to clear controls added to a panel

D

Dino Buljubasic

Hi,

how can I remove all components (JLabels, JTextFields, ...)
from a Jpanel ?

Thank you
 
T

Tjerk Wolterink

Dino said:
Hi,

how can I remove all components (JLabels, JTextFields, ...)
from a Jpanel ?

Thank you


JPanel.removeComponent( for all JPanel.getComponents()) ???
 
P

Paul van Rossem

Hi,

how can I remove all components (JLabels, JTextFields, ...)
from a Jpanel ?

Thank you
What about removeAll() ?

(..you should learn how to find your way in the javadocs...)

Good luck, Paul.
 
D

Dino Buljubasic

I know, just starting :)
My first week in java and I guess I am trying to do to much for my
level :)

Anyways, thanks for help
 

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

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top