ArrayIndexOutOfBoundException
HI All
Following is a code snippet of my table model, it bound the value of a vector to the table.
publicint getColumnCount(){return 1;}
publicint getRowCount(){return results.size();}
public String getColumnName(int column ){
return"Report Name";
}
public Class getColumnClass(int i ){
return String.class;
}
public Object getValueAt(int row,int col ){
return results.get( row );
}
/*
* Update changes to add Database records
* to the table*/
publicvoid fireTableChanged(){
for(int i = 0; i < results.size() ; i++ ){
getValueAt( i, 0 );
}
}
/*public void valueChanged( ListSelectionEvent event ) {
if( event.getSource() ==)
}*/
I wrote a listener valueChanged function, the function prints the selected row and column correctly, but when using getValueAt(table.getSelectedRow(), table.getSelectedColumn())
an ArrayIndexOutOfBoundException
is thrown....
Any help please?

