panel = new ScrollingPanel(); viewport.setView(panel);
  protected LayoutManager createLayoutManager()  {    if (tabPane.getTabLayoutPolicy() == JTabbedPane.WRAP_TAB_LAYOUT)      return new TabbedPaneLayout();    else      {        incrButton = createIncreaseButton();        decrButton = createDecreaseButton();        viewport = new ScrollingViewport();        viewport.setLayout(null);        panel = new ScrollingPanel();        viewport.setView(panel);        tabPane.add(incrButton);        tabPane.add(decrButton);        tabPane.add(viewport);        currentScrollLocation = 0;        decrButton.setEnabled(false);        panel.addMouseListener(mouseListener);        incrButton.addMouseListener(mouseListener);        decrButton.addMouseListener(mouseListener);        viewport.setBackground(Color.LIGHT_GRAY);        return new TabbedPaneScrollLayout();      }  }