Code example for JScrollPane

Methods: getHorizontalScrollBargetVerticalScrollBar

0
    this.logTree.setScrollsOnExpand(false);
    // if I do this.logTree.setRootVisible(false) => Create an invisible tree, even if I use an "expand" 
    // then need to expand after the first insert into the tree so i give up with root not visible. 
    this.logTree.addMouseListener(this);
 
    JScrollPane jsp=new JScrollPane(logTree);
    this.jsb_horizontal=jsp.getHorizontalScrollBar();
    this.jsb_vertical=jsp.getVerticalScrollBar();
    jp.add(jsp, BorderLayout.CENTER);    
    jp.setMinimumSize(new Dimension(500,25));
  } 
 
  ///////////////////////////////////////////////////// 
  //           Mouse Listener Interface              // 
  ///////////////////////////////////////////////////// 
  public void mouseEntered(MouseEvent e){}
  public void mouseClicked(MouseEvent e) {}
  public void mouseExited(MouseEvent e){}
  public void mouseReleased(MouseEvent e){} 
  public void mousePressed(MouseEvent e) {