Topic: 为什么编译器报错,我怎么检查都觉得我编的是对的,代码就几行请大家帮我看看

  Print this page

1.为什么编译器报错,我怎么检查都觉得我编的是对的,代码就几行请大家帮我看看 Copy to clipboard
Posted by: javabt
Posted on: 2004-05-11 21:58

class CustomModel extends DefaultTableModel{
public CustomModel(Object[] columnNames,int numRows){
super(columnNames,numRows);
}
public void setValueAt(Object aValue,int row,int column){
super.setValueAt(Object aValue,int row,int column);
int rownum=table.getSelectedRow();//得到当前行号
System.out.println("当前行号是 "+rownum);
int columnnum=table.getSelectedColumn();
String clumnname=table.getColumnName(columnnum);
System.out.println("当前列名是"+clumnname);

}

public boolean isCellEditable(int row,int column){
return true;
}
}

错误报告:
C:\Documents and Settings\JeLi>javac DataBase.java
DataBase.java:22: ')' expected
super.setValueAt(Object aValue,int row,int column);
^
1 error

2.Re:为什么编译器报错,我怎么检查都觉得我编的是对的,代码就几行请大家帮我看看 [Re: javabt] Copy to clipboard
Posted by: 4bug
Posted on: 2004-05-11 23:44

super.setValueAt(Object aValue,int row,int column);
改为
super.setValueAt(aValue,row,column);

3.Re:为什么编译器报错,我怎么检查都觉得我编的是对的,代码就几行请大家帮我看看 [Re: javabt] Copy to clipboard
Posted by: javabt
Posted on: 2004-05-12 00:27

我当时真是傻B!太谢谢你了


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923