posted 21 years ago
Hi.
If some conditions are fulfilled, I would like to prevent the user from selecting other items in the JCombobox list i.e. if the user clicks on another item other than the default one in setSelectedIndex, the display will not change and stay the same e.g.
In this code the entry "pig" is displayed as the default, but if the user clicks on "cat", that the display is set to "cat".
I want to prevent that, so that "pig" is always displayed regardless what other pets the user might click on.
TIA :-)