解决方案 »
- 如何弄出玻璃色的...........
- 一个大问题
- 为何出现java.lang.ClassFormatError??
- 哪位高手进来帮帮忙啊!Tomcat安装成功但在eclipse中就是运行不好.急待解决.
- 一个菜鸟关于String的问题!!!
- 如何由二维数组,变成三维的?
- java 简单图形界面 为什么被覆盖
- 怎么样才能从microsoft excel表中取得数据,并能把数据写回到excel表中呢?
- 网上搞来java实现zip功能,怎么通不过?????
- mysql的jdbc连接问题,请指教!!!
- 我把代码贴出来, 哪位高手能帮助修改一解决一下,万分感激...
- 写的记事本程序为什么图片有的显示出来有的显示不出来?
public class MyClass implements ActionListener {
2、Register an instance of the event handler class as a listener on one or more components. For example:
someComponent.addActionListener(instanceOfMyClass);
3、Include code that implements the methods in listener interface. For example:
public void actionPerformed(ActionEvent e) {
...//code that reacts to the action...
}
===================================================================================
至于你的情况,是缺少了addActionListener的方法调用。
不防在NextCustomerJButton构造函数中加入:
addActionListener(this);
请问树哥:
您的方案,使用布局管理器解决问题.
弟我已经在代码块1中的第61行处,进行了“布局管理器”:设置为BordLayout的边界布局了呀...?
为什么还会有:
不能够让“按钮变长”的问题被处理的场景出现呢?
希望能够得到树哥的点拨!!