public Object getValueAt(int rowIndex, int columnIndex) { if (set != null) { try { set.setRow(offset + rowIndex); Object o = set.getObject(columnIndex); if (o == null) { return ""; } return o.toString(); } catch (Exception e) { e.printStackTrace(); } } return null; }
public String getColumnName(int columnIndex) { if (set != null) { return set.getColumnName(columnIndex); } return null; }
public int getColumnCount() { if (set != null) { return set.getColumnCount(); } return 0; }
public Class getColumnClass(int columnIndex) { try { return set.getTypeClass(columnIndex); } catch (Exception e) { e.printStackTrace(); } return String.class; }
public void setResultSet(DiskResultSet rset) throws Exception { set = rset; max = rset.getRowCount(); table.setModel(model); table.setModel(this); offset = 0; scrollBar.setValue(0); scrollBar.setMaximum((max < window ? 0 : max - window)); }