Menu

#39 JTable selection problems

open
nobody
None
5
2005-03-04
2005-03-04
reagan2
No

When I use the liquid look and feel, the table selections
don't seem to fire events correctly.

For example, a mouse click in a JTable should allow me
to call table.getSelectedRow(); in order to get the
selected index.

Doing this however, results in the previously selected
index being returned. eg if no rows are selected then
you select the first row, the index returned will be -1. If
you then select the second row, the index returned is 0.
Then, if you select the first row again, the index returned
is 1.

I can get around this by doing table.rowAtPoint
(e.getPoint()); but for my more complex tables (eg one
of them is a JTreeTable similar to
http://java.sun.com/products/jfc/tsc/articles/treetable1/\)
this does not work.

Is there something that I need to do to get around this
or is it a bug??

Thanks.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB