Not sure if this should be in New to Java or AWT/Swing, but here goes.
I've got a JTable. The JTable has a ListSelectionListener.
Whenever I run the program, the first two clicks on the JTable throw double (mousePressed, mouseReleased) ArrayIndexOutOfBoundsExceptions: -1. They point to the last line above. After that, everything works as planned.
public void valueChanged(ListSelectionEvent l)
int row = table1.getSelectedRow();
int column = table1.getSelectedColumn();
boolean isAdjusting = l.getValueIsAdjusting();
String value = (String) table1.getValueAt(row, 0);
Any help appreciated.