0
int r = JOptionPane.showOptionDialog(null,
myPanel,
"Choose",
JOptionPane.NO_OPTION,
JOptionPane.PLAIN_MESSAGE,
null,
new String[]{}, // this is the array
"default");
ユーザーがダイアログを閉じるためにXをクリックしたときに、どのようにイベントをキャッチしますか? the documentationからJava:XをクリックしてJOptionPaneが閉じられたときを知る方法?