Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable row

 
supriya acharya
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello

I am using JTable to display contents..when i am selecting any row is it possible to automatically scroll the contents so that user can read full contents..
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, if there are more rows than can fit on the screen, clearly no amount of scrolling will make them all visible at the same time.

Or when you said "the contents" did you just mean the contents of the selected row, and not the contents of the table? Again, if there are more columns than can fit on the screen, clearly no amount of scrolling will make them all visible at the same time.
 
supriya acharya
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i mean to scroll contents of the selected row and selected column only say i have 2nd column in which i have one big line but on the screen it is not fully visible so when i am selecting that cell(row) is it possible to scroll it automatically?
 
Maneesh Godbole
Saloon Keeper
Posts: 11185
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out JTable#getCellRect() and JComponent#scrollRectToVisible().
Using these two you can achieve the desired effect.
I presume your column width is sufficient enough to display the big line.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic