File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JTable row

 
supriya acharya
Greenhorn
Posts: 28
  • 0
  • 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
Pie
Posts: 20164
24
MySQL Database
  • 0
  • 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
  • 0
  • 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: 10971
11
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • 0
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic