Hello all. How can I trap the drop down event on a JComboBox? Thanks.
posted 15 years ago
You can add ListSelectionListener to the JComboBox, but make sure that setPopupVisible(true).
posted 9 years ago
I am using the Matisse GUI in the NetBeans IDE and I have a JComboBox. When perusing the list of events associated with the JComboBox, I do not see ListSelectionListener. I need a listener to capture the setting in the JComboBox whether it be the default first item or a user selected setting. There will be times when the user doesn't select anything in this combo box but just takes the default displayed first item, so I am leary of trying an ActionPerformed listener. I do see ComponentShown listed as an option but do not know if this maps to a ListSelectionListener. Anybody know what I should select from the Matisse event properties list for JComboBox?