Why does setSelected on JCheckBox lose effect?

后端 未结 2 464
伪装坚强ぢ
伪装坚强ぢ 2020-11-27 23:16

Can someone explain to me why I lost the selection (set by setSelected()) for JCheckBox when I put the JOptionPane into the Item

2条回答
  •  广开言路
    2020-11-28 00:12

    On Mac OS X & Ubuntu I don't see any difference: Starting from the DESELECTED state, I click on the checkbox. I see the check mark appear immediately, followed by the option pane. I get the same result with or without the Runnable.

    On Windows, the result is as described, but I see a tiny flicker of the check mark as the option pane comes to the foreground. The effect is easier to see in an emulator, such as VirtualBox, which can slow things down. Queueing the Runnable restores normal operation.

提交回复
热议问题