0
int r = JOptionPane.showOptionDialog(null,
myPanel,
"Choose",
JOptionPane.NO_OPTION,
JOptionPane.PLAIN_MESSAGE,
null,
new String[]{}, // this is the array
"default");
當用戶點擊X來關閉對話框時,如何捕捉事件?Java:如何通過單擊X來知道何時關閉了JOptionPane?