Unwanted ListSelectionEvent when using JComboBox
Posted on 1998-07-27
In my JApplet a JTable is contained as well as a JComboBox which is used to determine the content of the JTable.
At first no row in the JTable is selected and so some JMenuItems of a JMenu which also contained in the JApplet are disabled. These should become only enabled when a row in the JTable is selected.
When the JComboBox' is used its list drops down over a part of the JTable.
Whenever the JComboBox' list drops down and I choose an item a ListSelectionEvent is fired from the table's DefaultListSelectionModel.
So it seems that clicking on a JComboBox' item goes through this component and reaches a row from the JTable.
A selected row, however, is not displayed then, all rows appears unselected.
How can I prevent from this?