首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java相关 >

参数有关问题

2012-03-13 
参数问题public void actionPerformed(ActionEvent e){if(e.getSource()ok){if(rows.getText().equals(

参数问题
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为一个对象

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

热点排行