allelopath
asked on
Set position in JScrollPane
I have a JTable in a JScrollpane. Suppose the table has 20 rows and only rows 1-10 are visible in the pane. How would I programmatically make, say, row 15 visible in the pane, with out enlarging the pane?
ASKER
Thanks for the reply, but that is not what I want to do, and I apologize for not being clear.
Supposing rows 1-10 are visible, I would like, eg. to make rows 5 - 15 visible.
Supposing rows 1-10 are visible, I would like, eg. to make rows 5 - 15 visible.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok, now we're getting somewhere
So I know that I want to display row 15 of the table
setViewPosition requires a Point.
How do I translate row 15 into a Point?
So I know that I want to display row 15 of the table
setViewPosition requires a Point.
How do I translate row 15 into a Point?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
objects: thx as always for your input, but in this case your link is nearly the same as the previous one from CEHJ
:-)
http://download.oracle.com/javase/1.5.0/docs/api/javax/swing/JTable.html#rowHeight