You could subclass DefaultComboModel to override setSelectedItem to either:
perform your validation before the event instead of after it retain the last value and have an ability to restore it Dave Wathen Canzonet Limited http://www.canzonet.com mailto:[EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Samivelu, Srinivasan Sent: 15 May 2002 04:55 To: '[EMAIL PROTECTED]' Subject: Resetting JComboBox after a selection Dear All, I am doing a check in my customized combo box this way. If the selected item is not of acceptable value then i need to reset my combo box to the previous selection. This check is being done in the ItemListener of the Control. So now my problem is, i properly validate but could not reset to the previous selection. Is there any way to reset to the previous selection ?. wbr, Srinivasan Samivelu Development Engineer BarcoNet Private Limited Tel +91 44 254 06 02/03/04 ext 204 Fax +91 44 254 06 01 Mailto:[EMAIL PROTECTED] http://www.barconet.com _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing _______________________________________________ Advanced-swing mailing list [EMAIL PROTECTED] http://eos.dk/mailman/listinfo/advanced-swing