Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to select row(s) in JTable ?

Status
Not open for further replies.

Strannik

Programmer
Jul 4, 2002
132
UA
I need to select some row(s) in a table. The following code does nothing:

table.GetColumnModel().setColumnSelectionAllowed(true);
table.setRowSelectionAllowed(true);
table.setRowSelectionInterval(0, 0);
table.setColumnSelectionInterval(0,3);

I've looked through all help but found nothing :( Can somebody resolve this problem ??
 
You can select a row like this :

Object o = table.getValueAt(row, column)

PS, this forum is supposed to be for J2EE technology, not J2SE - which can be found at forum269
 
to sedj:

Thanks for the information, but your code does nothing :(
 
Anyone replying to this thread should note that it is moved to forum269.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top