首页 > 代码库 > java中利用JOptionPane类弹出消息框的部分例子

java中利用JOptionPane类弹出消息框的部分例子

转:

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

http://847353020-qq-com.iteye.com/blog/954532

 

java中利用JOptionPane类弹出消息框的部分例子