资源预览内容
第1页 / 共3页
第2页 / 共3页
第3页 / 共3页
亲,该文档总共3页全部预览完了,如果喜欢就下载吧!
资源描述
JOptionPane.showMessageDialog(null, 错误消息!, 错误,JOptionPane.ERROR_MESSAGE);JOptionPane.showMessageDialog(null, 信息消息。,“提示, JOptionPane.INFORMATION_MESSAGE);JOptionPane.showMessageDialog(null, 警告对话框!, 警告, JOptionPane.WARNING_MESSAGE);JOptionPane.showMessageDialog(null, 没有图标的提示!, 信息,JOptionPane.PLAIN_MESSAGE);Icon icon = new ImageIcon(getClass().getResource(middle.gif);JOptionPane.showMessageDialog(null, 自定义图片的信息提示!, 信息,JOptionPane.INFORMATION_MESSAGE, icon);Object options = 是的, 不是, 不确定 ; int n = JOptionPane.showOptionDialog(this, 你喜欢看定影吗?, 自定义询问,JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,null, options, options2);Icon icon = new ImageIcon(getClass().getResource(middle.gif);Object options = 是的, 不是, 不确定 ;int n = JOptionPane.showOptionDialog(this, 你喜欢看定影吗?, 自定义询问,JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE,icon, options, options2);int n = JOptionPane.showConfirmDialog(this, 你喜欢蓝色吗?, 询问,JOptionPane.YES_NO_OPTION);Object options = Yes, please, No way! ;int n = JOptionPane.showOptionDialog(this,Would you like green eggs and ham?, A Silly Question,JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null,options, / the titles of buttonsoptions0); / default button titleObject possibilities = 苹果, 香蕉, 橘子 ;String s = (String) JOptionPane.showInputDialog(this, 你喜欢什么样的水果?:n,Customized Dialog, JOptionPane.QUESTION_MESSAGE, null,possibilities, ham);String inputValue = JOptionPane.showInputDialog(请输入一个值:);
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号