Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 25-Feb-13 5:54am
v2
Comments
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
http://stackoverflow.com/questions/4890282/howto-to-scroll-to-last-row-on-jtable
april88t 1-Mar-13 23:25pm    
you can also visit this site http://objectmix.com/java/72860-keeping-visible-last-row-jtable.html
DalliaF 8-Mar-13 2:32am    
try this one also-->http://stackoverflow.com/questions/13446493/display-last-row-in-jtable-java

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900