Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JXTable: Display the default selected row in the scroll

 
Vo Hien
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hi Everyone,
I am working with JXTable and I add an dataModel to the table. The dataModel contains about 200 items. One of the item is selected as default (The checkbox in the row is selected) when the table is displayed.

When the selected row is about 180, the table will not display the selected row, because all the items in display inside a scrollpane, so when can see only the first item(ex: from 0 ->50).

How can we set the table so that when the table is displayed, it will show the selected row as default.

Thanks and regards,
Hien

 
Maneesh Godbole
Saloon Keeper
Posts: 11070
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't worked with JXTable myself, but if it extends JTable, check out JTable#getCellRect() and JTable#scrollRectToVisible()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic