[java]代码库
JOptionPane.showMessageDialog(null, "友情提示");
JOptionPane.showMessageDialog(null, "提示消息", "标题",JOptionPane.WARNING_MESSAGE);
JOptionPane.showMessageDialog(null, "提示消息.", "标题",JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog(null, "提示消息.", "标题",JOptionPane.PLAIN_MESSAGE);
int n = JOptionPane.showConfirmDialog(null, "你高兴吗?", "标题",JOptionPane.YES_NO_OPTION);//i=0/1
Object[] options ={ "有啊!", "没有!" };
int m = JOptionPane.showOptionDialog(null, "你有时间吗?", "标题",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
Object[] options1 ={ "有啊!", "没有!" };
int m1 = JOptionPane.showOptionDialog(null, "你有时间吗?", "标题",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options1, options1[0]);
Object[] obj2 ={ "足球", "篮球", "乒乓球" };
String s = (String) JOptionPane.showInputDialog(null,"请选择你的爱好:\n", "爱好", JOptionPane.PLAIN_MESSAGE, new ImageIcon("src/football.jpg"), obj2, "足球");
ImageIcon icon = new ImageIcon("src/football.jpg");
JOptionPane.showInputDialog(null,"请输入你的爱好:\n","title",JOptionPane.PLAIN_MESSAGE,icon,null,"在这输入");
初级程序员
by: 555 发表于:2020-12-20 09:29:19 顶(0) | 踩(0) 回复
66666666666666
回复评论