Link to home
Start Free TrialLog in
Avatar of allelopath
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?
Avatar of robthewolf
robthewolf
Flag of Israel image

Avatar of allelopath
allelopath

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.
SOLUTION
Avatar of robthewolf
robthewolf
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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?
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
objects: thx as always for your input, but in this case your link is nearly the same as the previous one from CEHJ
:-)