请教一个小问题
jButton1.setBounds(new Rectangle(35, 217, 81, 23));
jButton1.setText( "确定 ");
jButton1.addActionListener(new storePanel_jButton1_actionAdapter(this));
上面语句要给jbutton1添加监听器。 提示 can not find symbol
请问是不是少引用了什么包还是有其他的错误!!!
[解决办法]
storePanel_jButton1_actionAdapter是哪来的?
[解决办法]
好像 缺了一点什么
[解决办法]
初学者,我,来学习下,帮顶!
[解决办法]
没写全啊,至少还应该有下面的代码
class StorePanel_jButton2_actionAdapter
implements java.awt.event.ActionListener{
StorePanel adaptee;
public StorePanel_jButton2_actionAdapter(StorePanel adaptee){
this.adaptee = adaptee;
}
public void actionPerformed(ActionEvent e) {
adaptee.jButton2_actionPerformed(e);
}
}
然后在StorePanel类里加个方法:
void jButton2_actionPerformed(ActionEvent e){
//do something
}
PS:LZ最好能注意下大小写。。
[解决办法]
你的那个this(eventFrame)没有实现TreeSelectionListener接口……