日期:2014-05-20  浏览次数:20624 次

参数问题
public void actionPerformed(ActionEvent e){
if(e.getSource()==ok){
if(rows.getText().equals("10000") && columns.getText().equals("123")){
long cn=Long.parseLong(rows.getText());
int pw=Integer.parseInt(columns.getText());
a.performConnection(cn, pw);
}
else{
Frame f=new MyFrame2();
f.show();
}
}
dispose();
//换用以下代码错误???
/*String c=rows.getText(),b=columns.getText();
public void actionPerformed(ActionEvent e){
if(e.getSource()==ok){
if(c.equals("10000") && b.equals("123")){
long cn=Long.parseLong(rows.getText());
int pw=Integer.parseInt(columns.getText());
a.performConnection(cn, pw);
}
else{
Frame f=new MyFrame2();
f.show();
}
dispose();

a为一个对象

------解决方案--------------------
你把代码完整贴出来,这么一段代码无法重现问题,无法调试