예제 #1
0
 public void actionPerformed(ActionEvent e) {
   if (e.getSource() == top) {
     tabbedpane.setTabPlacement(JTabbedPane.TOP);
   } else if (e.getSource() == left) {
     tabbedpane.setTabPlacement(JTabbedPane.LEFT);
   } else if (e.getSource() == bottom) {
     tabbedpane.setTabPlacement(JTabbedPane.BOTTOM);
   } else if (e.getSource() == right) {
     tabbedpane.setTabPlacement(JTabbedPane.RIGHT);
   }
 }
  /**
   * Handle action events coming from the buttons.
   *
   * @param evt, the associated ActionEvent.
   */
  public void actionPerformed(ActionEvent evt) {
    Object source = evt.getSource();

    if (source instanceof JButton) {
      if (source == pbSave) {
        chosen = tcc.getColor();
        onCancel();
      } else {
        onCancel();
      }
    }
  }