开发者

javax.swing.JDialog is appearing twice on windows device

开发者 https://www.devze.com 2022-12-28 23:16 出处:网络
I have created a J开发者_StackOverflowDialog 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 window

I have created a J开发者_StackOverflowDialog 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.


ok I have got the solution

public void valueChanged(ListSelectionEvent e) {
    if (e.getValueIsAdjusting() == false) {
        List lsm = (List) e.getSource();
        showDialog();
        lsm.clearSelection();
    }
}
0

精彩评论

暂无评论...
验证码 换一张
取 消