I have created a JDialog to be opened when I click on the edit button of my JFrame, it is being opened properly and does'nt have any issue, but when I took this code on the windows ce 5.0 device this dialog is being opened twice. hat is i am clicking only once on the edit button but the dialog is appearing twice, I want there should be only one dialog appear on edit button click.
A:
ok I have got the solution
public void valueChanged(ListSelectionEvent e) {
if (e.getValueIsAdjusting() == false) {
List lsm = (List) e.getSource();
showDialog();
lsm.clearSelection();
}
}
Bhaiyaji Patel
2010-04-28 09:42:30
Reformatted code; please revert if incorrect.
trashgod
2010-04-28 18:00:00
The predicate `!e.getValueIsAdjusting()` is a common alternative to `e.getValueIsAdjusting() == false`.
trashgod
2010-04-28 18:03:58