Click here to Skip to main content
12,817,318 members (34,048 online)
Rate this:
Please Sign up or sign in to vote.
See more: Java
I have a jtable with many row and is added into jscrollpanel,

When i add more a row to table, I want to set selection to new row and scrollbar of table must be scrolled to end row to show end row,

I try to use code as below but scrollbar don't scroll to end row.
int curRow = model.getRowCount();
Table.setRowSelectionInterval(curRow -1, curRow -1);

please help me!

Thank in advance
Posted 25-Feb-13 6:52am
Updated 25-Feb-13 6:54am
TorstenH. 26-Feb-13 1:40am
Can't you just set selection and the table moves to the selected position? Should be so imho.
Shubhashish_Mandal 26-Feb-13 4:36am
check this
april88t 1-Mar-13 23:25pm
you can also visit this site
DalliaF 8-Mar-13 2:32am
try this one also-->

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100