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

[2294 byte] By [devika78a] at [2007-11-27 6:53:51]
# 1
> int row = resultSet.getRow();how much row do you have?
j_shadinataa at 2007-7-12 18:28:42 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2
currently only 3 but i plan on adding more as this is really just a demo to try and see if it would work
devika78a at 2007-7-12 18:28:42 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3
Your setTableCursor method is calling setSelectionInterval. And ultimately that calls something else which calls setTableCursor. You can see that if you look at a larger piece of the stack trace than what you posted here.
DrClapa at 2007-7-12 18:28:42 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...