0

I have a ComboBox on which depends what components are visible on my window.

For example if combobox is set for "color", red.setVisible() green.setVisibe(), blue.setVisible() are set for true, otherwise for false.

The problem is I want to put different buttons on same place (they could not be both visible on the same time), but unfortunately netbeans doesn't allow me to do that.

Is there any way to change that?

moskito-x
  • 11,832
  • 5
  • 47
  • 60
JohnnyGat
  • 325
  • 2
  • 13
  • In the form designer, no – MadProgrammer Jun 16 '14 at 00:28
  • 2
    For many (or even 2) components in one space, use a [`CardLayout`](http://docs.oracle.com/javase/7/docs/api/java/awt/CardLayout.html) as seen in this [short example](http://stackoverflow.com/a/5786005/418556). That layout will be available via the Netbeans GUI designer, but you should really figure out how to write Java GUIs in code rather than use an IDE to write it for you. – Andrew Thompson Jun 16 '14 at 01:07

0 Answers0