• Post Reply Bookmark Topic Watch Topic
  • New Topic

How delete JComboBox control?

 
Andrzej Borucki
Ranch Hand
Posts: 86
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Java, different to Pascal is automatical garbaging collection, but how to force remove control?
I have

will be sufficient?
 
Darryl Burke
Bartender
Posts: 5153
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really should go through this tutorial: Creating a GUI With JFC/Swing.

As to your immediate question
how to force remove control?
...
will be sufficient?

The answer depends on whether buttons[1] is the Container that contains chBaseList. Also note that when you remove a Component from an already realized Container, it is necessary to revalidate() the Container. If the Container is visible, it is further necessary to repaint() it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!