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, I have a JComboBox. Let it contain some items like "a","b", "c", etc. Now i want to do an activity when the person changes the selection in the combo. Let me explain in detail. Ket us assume that the JCombo is currently displaying "a". Now when the user selects "b" and moves out of focus of the JCombo, i need to an activity. What i maen is that i dont want to do the actvity just when the selected item is changed (coz when he scrolls down the list, the itemchanged will be fired). Also i dont want to do the activity when he deselects "a", then selects "b", and then comes back to "a"(all withought going out of focus of the combo). Earlier i thought that for this i would store the intial selected item("a") in a temporary variable, and on focus lost event of the jcombo, only if the selected item is other than the intial selection i will do the activity. But again By JComboBox is the only thing in the frame, so the focus lost event is not triggered,coz there is no other elemnet to put focus. But whne i clcik the mouse on any empty place of the frame, the focus lost for the combo should be triggered. its not happeneing so. What do i do? how do i solve it? Waiting for ur replies. Regards Saj
[This message has been edited by Sajee Joseph (edited December 21, 2001).]