Click here to Skip to main content
12,244,664 members (54,884 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
ngthtra1.4K
Edited 25-Feb-13 6: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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160426.1 | Last Updated 25 Feb 2013
Copyright © CodeProject, 1999-2016
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