File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Multiple selection in JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Multiple selection in JTable" Watch "Multiple selection in JTable" New topic

Multiple selection in JTable

chaitanya bh

Joined: Sep 28, 2006
Posts: 1
i had a problem in selecting mutiple rows. if we select 3 or 10 rows with Ctrl+A and Mouseclick when we select the 4th or 10th row it is deselecting the remaining rows. can any one help me
Cp Baherwani
Ranch Hand

Joined: May 13, 2005
Posts: 41
I do not get the question completely. You press Ctrl+A to select all the rows, then how do you need a mouse click to select the 4th row?

If your question is that you selected some rows and need to add the 4th row to the selected rows then:
Hold the Ctrl down when you click on the 4th row to add it to current set of selected rows.
I agree. Here's the link:
subject: Multiple selection in JTable
jQuery in Action, 3rd edition