This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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 :-)