Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Maintaining selected rows in JTable when clicking a JButton

843807Mar 9 2010 — edited May 28 2010
I have an application with a JTable with multiple rows and columns. I have a JButton that performs an action on each row that is selected in the JTable. When I click the button, the actions get performed on the selected rows correctly. However, all the rows become unselected after I click (probably because the focus goes to the JButton). Is there a way to keep all those rows selected?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2010
Added on Mar 9 2010
5 comments
1,287 views