my dog learned polymorphism
The moose likes Applets and the fly likes scrollbar move to bottom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "scrollbar move to bottom" Watch "scrollbar move to bottom" New topic

scrollbar move to bottom

Rakesh Kumar
Ranch Hand

Joined: May 30, 2006
Posts: 63
Dear friends,
I am using one Jtable in row also scrollbar .And requirement is while adding each row the table row and scroll bar will go to last row automatically.
I atried below code.



But some times the scrobar and bottom has a very small gap.
If anybody has any idea please share with me .

Rakesh Kumar
Ranch Hand

Joined: May 30, 2006
Posts: 63
Hi dear friends,
I found solution for this.

just implement adjustmentlistener for vertical scroll bar and set the visible rect method in side the adjustment valuechanged(event e){} method.It will be handled.
It is sorta covered in the JavaRanch Style Guide.
subject: scrollbar move to bottom
It's not a secret anymore!