0

Using Java's WindowBuilder to create a GUI where a JComboBox is changed from enabled to un-enabled when a certain JToggleButton is pressed. Basically, when Button A is toggled on, Button B becomes toggled off, and vice versa. When Button A is toggled on, JComboBox A becomes enabled and disables JComboBox B, and vice versa for when Button B is toggled on (JComboBox B is enabled and ComboBox A is disabled).

So, the scenario: I run the program and press Button A, then select an item from ComboBox A. Button B is switched on, so ComboBox A is disabled and ComboBox B enabled. But when I switch back to Button A and try to open ComboBox A, instead of the drop-down of items, a white box appears. When I click on the white box, it selects an item and shows it, but the initial display is just a white drop-down.

Not sure why this is, and it's strange because the items are still there, just not exactly visible until I click on the blank, white box. Then one of the items shows that it was selected.

Thanks

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
  • 1
    Post some code please – Omar Mainegra Jun 17 '15 at 22:14
  • 1
    Consider providing a [runnable example](https://stackoverflow.com/help/mcve) which demonstrates your problem. This is not a code dump, but an example of what you are doing which highlights the problem you are having. This will result in less confusion and better responses – MadProgrammer Jun 17 '15 at 22:22
  • 1
    See also [*How do I create screenshots?*](http://meta.stackoverflow.com/questions/99734/how-do-i-create-a-screenshot-to-illustrate-a-post) – trashgod Jun 17 '15 at 22:31

0 Answers0