Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JScrollPane  RSS feed

 
Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have 2 JScrollPanes one over another.
Now i need to synchronize the movement of Horizontal scrollbar of lower scrollpane with the Horizontal scrollbar of the scrollpane above.
Assuming that bar1 is horizontal scrollbar for upper scrollpane and bar2 is for lower,
i have the following code,
bar2.addAdjustmentListener(new AdjustmentListener(){
public void adjustmentValueChanged(AdjustmentEvent ea)
{
bar1.setValue(e.getValue());
}
});
But this does not move the scrollbar.
What might be the problem?
Thanks,
Chinmay.
 
Chinmay Bajikar
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello...any suggestions,directions.
Plzz help.I m still at large.
Thanks,
Chinmay
 
Wirianto Djunaidi
Ranch Hand
Posts: 210
Ruby Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way to do it:

Hope that work.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!