JOptionPane_私有内部类
来源:互联网 发布:阿里云服务器 php环境 编辑:程序博客网 时间:2024/06/14 08:07
private class ShowAction implements ActionListener {
@Override
public void actionPerformed(ActionEvent event) {
if(typePanel.getSelection().equals("Confirm")) {
//Confirm: 要显示的信息, 标题, 显示操作的类型, 显示的信息的类型
JOptionPane.showConfirmDialog(OptionDialogFrame.this, getMessage(), "Title",
getType(optionTypePanel), getType(messageTypePanel));
} else if(typePanel.getSelection().equals("Input")) {
if(inputPanel.getSelection().equals("Text field")) {
JOptionPane.showInputDialog(OptionDialogFrame.this, getMessage(), "Title", getType(messageTypePanel));
} else {
JOptionPane.showInputDialog(OptionDialogFrame.this, getMessage(), "Title", getType(messageTypePanel),
null, new String[] {"Yellow", "Blue", "Red"}, "Blue");
}
} else if(typePanel.getSelection().equals("Message")) {
JOptionPane.showMessageDialog(OptionDialogFrame.this, getMessage(), "Title", getType(messageTypePanel));
} else if(typePanel.getSelection().equals("Option")) {
JOptionPane.showOptionDialog(OptionDialogFrame.this, getMessage(), "Title", getType(optionTypePanel),
getType(messageTypePanel), null, getOptions(), getOptions()[0]);
}
}
}
@Override
public void actionPerformed(ActionEvent event) {
if(typePanel.getSelection().equals("Confirm")) {
//Confirm: 要显示的信息, 标题, 显示操作的类型, 显示的信息的类型
JOptionPane.showConfirmDialog(OptionDialogFrame.this, getMessage(), "Title",
getType(optionTypePanel), getType(messageTypePanel));
} else if(typePanel.getSelection().equals("Input")) {
if(inputPanel.getSelection().equals("Text field")) {
JOptionPane.showInputDialog(OptionDialogFrame.this, getMessage(), "Title", getType(messageTypePanel));
} else {
JOptionPane.showInputDialog(OptionDialogFrame.this, getMessage(), "Title", getType(messageTypePanel),
null, new String[] {"Yellow", "Blue", "Red"}, "Blue");
}
} else if(typePanel.getSelection().equals("Message")) {
JOptionPane.showMessageDialog(OptionDialogFrame.this, getMessage(), "Title", getType(messageTypePanel));
} else if(typePanel.getSelection().equals("Option")) {
JOptionPane.showOptionDialog(OptionDialogFrame.this, getMessage(), "Title", getType(optionTypePanel),
getType(messageTypePanel), null, getOptions(), getOptions()[0]);
}
}
}
- JOptionPane_私有内部类
- new 一个私有内部类
- java内部类之私有内部类、局部内部类、匿名内部类
- Java 私有内部类的探索
- 私有内部类的外部调用方式
- javac 对于私有内部类的奇怪处理
- 外部类可以访问内部类的私有成员
- java内部类----安全问题-----访问外围类的私有变量
- java 基础 内部类被私有访问特点
- 内部类是如何访问外部类私有对象的
- 内部类之设计模式-内部类可以访问外部类的私有成员
- 内部类之设计模式-内部类可以访问外部类的私有成员
- 调用内部类的私有方法,其中内部类和外部类的构造器都是私有的
- 定义一个包含私有成员变量和函数的类,再定义一个内部类,在内部类函数中访问外部成员变量,并调用外部函数。在外部类函数中创建内部类对象,调用内部类函数
- java 内部类和外部类互相访问各自的私有成员
- 接口interface和private私有内部类怎样一块配合着用?
- Scala学习笔记10【对象私有字段、Scala构造器、内部类】
- Java基础,外部类能够访问内部类的私有静态字段。
- 控制面板“添加或删除程序”rundll32错误解决
- 使用java生成Json数据
- javascript 设置select的默认选项
- 分页
- 查看编译后的class文件的版本信息
- JOptionPane_私有内部类
- ArcPad 10 使用与同步 ArcGIS Server 的数据全攻略(一)
- 工作11年,然后归零
- JOptionPane_构造函数和变量
- Aptina HiSPi与并行传感器的桥接
- CSS3新增内容
- info.plist一些设置
- 学习贵在习
- 【Django】orm指定字段名,表名