The Artima Developer Community
Sponsored Link

Java Answers Forum
Index of an UNselected row from a JTable??

1 reply on 1 page. Most recent reply: May 10, 2003 9:36 AM by Charles Bell

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 1 reply on 1 page
M Johnson

Posts: 4
Nickname: manova
Registered: Apr, 2003

Index of an UNselected row from a JTable?? Posted: May 9, 2003 1:54 AM
Reply to this message Reply
Advertisement
Does anyone know how could I get the index value of an UNselected row after it has been wrongly selected from a JTable?? I need this mechanism to clear off any wrong selection from an array of indices of records before deleting them from a database.

Thanx in advance.


Charles Bell

Posts: 519
Nickname: charles
Registered: Feb, 2002

Re: Index of an UNselected row from a JTable?? Posted: May 10, 2003 9:36 AM
Reply to this message Reply
Use the method
int getSelectedRow()
to get the row selected
or
int[] getSelectedRows()
to get an array of int values for the rows selected

The rows that are not selected correspond to all the row values not included when you call the above methods.

A row is either selected or not selected.
There are only two possibilities, making it easy to program.

Flat View: This topic has 1 reply on 1 page
Topic: Trouble with a jar file Previous Topic   Next Topic Topic: JTable Question?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use