关于监听器的问题 确定按钮是用JOptionPane examPane = new JOptionPane();examPane.showMessageDialog(MainFrame.this,"导入成功");做的,但不知道怎么给添加监听器 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 实现监听接口class xxxx extends ActionLister{public void actionPerformed(ActionEvent e) { .......具体处理}}添加监听new JButton("确定").addActionListener(new MyAction());好像是这个样子啊 JButton butt = new JButton("button");butt.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae) { //... }}); JOptionPane examPane = new JOptionPane();examPane.showMessageDialog(MainFrame.this,"导入成功");这是用 JOptionPane 中的一个方法实现的,弹出信息框所以不知道怎么弄 new ActionListener()再实现他的方法 jdk1.5,jdk1.6,jdk1.7的区别和联系是什么? 为什么会出现nullpointexception 错误? 求助 一个简单的连词游戏 for前声明,内定义 解决这种乱码问题立即给分 求jBuilder注册机! 关于Java的动态绑定和静态绑定 Thread 问题求助,很急! 我发现一个奇怪的问题? 今天是我生日!普天同庆!送分了! java编译通过,执行报没发现jimi的FormatOptionSet包 过来留下你的脚印。。。。。。。。。。。。。。。。。。。。。。。。。。
class xxxx extends ActionLister{public void actionPerformed(ActionEvent e) {
.......具体处理
}}添加监听
new JButton("确定").addActionListener(new MyAction());好像是这个样子啊
butt.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent ae) {
//...
}
});
examPane.showMessageDialog(MainFrame.this,"导入成功");
这是用 JOptionPane 中的一个方法实现的,弹出信息框
所以不知道怎么弄
再实现他的方法