public class TableModel extends AbstractTableModel {
public int page;
public TableModel(Integer p) {
this.page=p;
System.out.println("mm"+page);
}
public void pudata() {
System.out.println(page);
}
//System.out.println("model "+page);
private String[] columnNames = {"groupName","membersCount","previliage"};
public ArrayList<GroupData> data = (new DatabaseLayer ()).getGroup(page);
@Override
public int getRowCount() {
return data.size() ;
}
无法访问方法中的变量page
,getgroup()
它将 0 传递给getgroup()
方法。
public ArrayList<GroupData> data = (new DatabaseLayer ()).getGroup(page);