public ScrollablePrecedenceChain1NPanel() {
    fPatternPanel = new PrecedenceChain1NPanel();

    // For scrollpane to work there must be some extra space at the vertical end.
    // Otherwise, the panel is just resizing vvertically.
    // The PrecedenceChain1NPanel is 555x266. Setting the host panel to 556x360
    // has the desired effect. Also, no horizontal scrollbar is required.
    Dimension lD = fPatternPanel.getPreferredSize();
    lD.height = 360;
    lD.width = 556;
    setPreferredSize(lD);

    setLayout(new BorderLayout(0, 0));

    JScrollPane lPane = new JScrollPane(fPatternPanel);
    lPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);

    add(lPane, BorderLayout.CENTER);
  }
 public void updateChain(ChainEvents aEventChain) {
   fPatternPanel.updateChain(aEventChain);
 }
 public void updateEvents() {
   fPatternPanel.updateEvents();
 }
 public void setController(PSPController aPSPController) {
   fPatternPanel.setController(aPSPController);
 }
 public void clearSelection() {
   fPatternPanel.clearSelection();
 }
 public void setSelectedPattern(Pattern aSelectedPattern) {
   fPatternPanel.setSelectedPattern(aSelectedPattern);
 }
 public Pattern getSelectedPattern() {
   return fPatternPanel.getSelectedPattern();
 }