EarthWeb
Developer.com
Site
windows 2000
visual c++
java
visual basic
javascripts
recommend it
 
Book
thinking in java
 
Interact
forum
guest book
jobs
jokes
what's new

share code
 
Resource
add resource
modify resource
new resource
 

[Internet Jobs]
-----
Java by E-mail:

Get the weekly e-mail highlights on Java!
-----

-

Selecting a row programatically


Author: Zafir Anjum

To select a row you have to get the selection model of the JTable and call the setSelectionInterval() function. To select a single row both the start and end indices have to be the same value.


table.getSelectionModel().setSelectionInterval( row, row);

If, instead, you wanted to add a row to a selection, you would use the addSelectionInterval() function in the selection model.

Posted On: 9-Jan-1999

internet.commerce



Acceptable Use Policy


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers