i'd like to ask how one can get rid of all the components in a JPanel (buttons, labels,
comboboxes etc), so that you can add new components (at run time that is)
DDirectJ 0 Newbie Poster
Recommended Answers
Jump to PostYou can iterate through all the children of the JPanel removing them one at a time... but it's probably easier to remove the old JPanel from your window and replace it with a new empty one.
All 3 Replies
mKorbel 274 Veteran Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
DDirectJ 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.