转:
http://www.cnblogs.com/wangxiuheng/p/4449917.html
http://blog.csdn.net/penjie0418/article/details/9257917
只想要一个确认按钮,
It's the JOptionPane.DEFAULT_OPTION JOptionPane.showConfirmDialog(null, "MESSAGE", "TITLE", JOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE);
参考
http://stackoverflow.com/questions/11204878/joptionpane-showconfirmdialog-with-only-one-button
http://stackoverflow.com/questions/18133234/adding-action-to-joptionpane-buttons