Code example for Scrollbar

Methods: addAdjustmentListener

0
    private Scrollbar  _bottom;
    private TreeCanvas _tree;
    public TreeNodePanel(){ 
       setLayout( new ScrollLayout() ) ;
       _right  = new Scrollbar( Scrollbar.VERTICAL ,
                               0 , 50 , 0 , 101     ) ; 
       _bottom = new Scrollbar( Scrollbar.HORIZONTAL ,
                               0 , 50 , 0 , 101     ) ; 
 
       _tree = new TreeCanvas() ;
       add( _bottom  ) ;
       add( _right   ) ;
       add( _tree ) ;
 
       _tree.addComponentListener(this) ;
       _bottom.addAdjustmentListener(this);
       _right.addAdjustmentListener(this);
       _tree.setOffset( new Point( 20 , 20  ) ) ;
 
    } 
    @Override 
    public void adjustmentValueChanged( AdjustmentEvent event ){