[Advanced-java] How to scroll JTable in code?

Alvin Wang xwang at qtechservices.com
Tue Mar 4 20:48:15 2003


Thanks! However, your way can only scroll the row to the bottom of the pane,
not the top of the pane... Any improvements?



> -----Original Message-----
> From: advanced-java-bounces@lists.xcf.berkeley.edu
> [mailto:advanced-java-bounces@lists.xcf.berkeley.edu]On Behalf Of Lorin
> Davis
> Sent: Tuesday, March 04, 2003 3:21 PM
> To: 'Alvin Wang'; advanced-java@lists.xcf.berkeley.edu
> Subject: RE: [Advanced-java] How to scroll JTable in code?
>
>
> If  you know the row number you want to goto in the JTable why not just
> Change the selection selection on the JTable to that row
>
> ie) JTable.changeSelection (rowIndex, colIndex, false, false);
>
> -----Original Message-----
> From: Alvin Wang [mailto:xwang@qtechservices.com]
> Sent: Tuesday, March 04, 2003 12:19 PM
> To: advanced-java@lists.xcf.berkeley.edu
> Subject: [Advanced-java] How to scroll JTable in code?
>
>
> Hi, in my code, I want to scroll a JTable (in a JScrollPane) to a specific
> row. Can anyone tell me how to do this? thanks!
>
> Alvin
>
> _______________________________________________
> Advanced-java mailing list
> Advanced-java@lists.xcf.berkeley.edu
> http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java
> _______________________________________________
> Advanced-java mailing list
> Advanced-java@lists.xcf.berkeley.edu
> http://lists.xcf.berkeley.edu/mailman/listinfo/advanced-java