Stack Overflow when setting table cursor
Hello I've been working on a project and have run into a slight problem I have a MySql database up and running and have my Java program connecting to it (with some help from this forum) but whenever i connect to the database I get a Stack Overflow Error from the DefaultListSelectionModel here is the piece of code that is throwing the Exceptionprivatevoid setTableCursor()throws Exception{
try{
int row = resultSet.getRow();
dlsm.setSelectionInterval(row - 1, row - 1);
rowStatus.setText("Current Row is: " + row);
}
catch(Exception ex){
ex.printStackTrace();
}
}
as you can see i put a try catch block around it to see whats up but i can't see why I would get a stack overflow from this thedlsm is the DefaultListSelectionModel Here to is the error message i get EventQueueExceptionHandler Caught Throwable : java.lang.StackOverflowError
java.lang.StackOverflowError
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:179)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
at javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:214)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:402)
at javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:411)
at javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:435)
at NewUpdateTandL.setTableCursor(NewUpdateTandL.java:284)
at NewUpdateTandL.listSelectionModel_valueChanged(NewUpdateTandL.java:299)
at NewUpdateTandL$1.valueChanged(NewUpdateTandL.java:138)
and this just repeats till i run out of memory if any one could point me in the right direction on how to resolve this it would be appreciated

