コード例 #1
0
  /**
   * This method initializes jPanel
   *
   * @return JPanel
   */
  private JPanel getJPanel() {
    if (jPanel == null) {
      jPanel = new JPanel();
      java.awt.GridLayout layGridLayout7 = new java.awt.GridLayout();
      layGridLayout7.setRows(4);
      layGridLayout7.setColumns(4);
      layGridLayout7.setHgap(10);
      layGridLayout7.setVgap(10);
      jPanel.setLayout(layGridLayout7);

      // Another way to do this, but wouldn't
      // have a visual in the editor.
      //  for (int i = 1; i <= 16; i++) {
      //      String label = String.valueOf(i);
      //      JButton b = new JButton(label);
      //      b.addMouseListener(buttonEvents);
      //      b.addMouseMotionListener(buttonEvents);
      //      jPanel.add(b);
      //  }

      for (int i = 0; i < jButtons.length; i++) {
        jButtons[i] = createButton(String.valueOf(i + 1));
        jPanel.add(jButtons[i], null);
      }

      jPanel.setBackground(java.awt.Color.white);
      jPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(10, 10, 10, 10));
    }
    return jPanel;
  }
コード例 #2
0
 private void jbInit() throws Exception {
   border1 = BorderFactory.createEmptyBorder(20, 20, 20, 20);
   contentPane.setBorder(border1);
   contentPane.setLayout(borderLayout1);
   controlsPane.setLayout(gridLayout1);
   gridLayout1.setColumns(1);
   gridLayout1.setHgap(10);
   gridLayout1.setRows(0);
   gridLayout1.setVgap(10);
   okButton.setVerifyInputWhenFocusTarget(true);
   okButton.setMnemonic('O');
   okButton.setText("OK");
   buttonsPane.setLayout(flowLayout1);
   flowLayout1.setAlignment(FlowLayout.CENTER);
   messagePane.setEditable(false);
   messagePane.setText("");
   borderLayout1.setHgap(10);
   borderLayout1.setVgap(10);
   this.setTitle("Subscription Authorization");
   this.getContentPane().add(contentPane, BorderLayout.CENTER);
   contentPane.add(controlsPane, BorderLayout.SOUTH);
   controlsPane.add(responsesComboBox, null);
   controlsPane.add(buttonsPane, null);
   buttonsPane.add(okButton, null);
   contentPane.add(messageScrollPane, BorderLayout.CENTER);
   messageScrollPane.getViewport().add(messagePane, null);
 }
コード例 #3
0
ファイル: Frame1_AboutBox.java プロジェクト: pedrocleto/Java
 /**
  * Component initialization.
  *
  * @throws java.lang.Exception
  */
 private void jbInit() throws Exception {
   image1 = new ImageIcon(pt.inescporto.siasoft.MenuFrame.class.getResource("about.png"));
   imageLabel.setIcon(image1);
   setTitle("About");
   panel1.setLayout(borderLayout1);
   panel2.setLayout(borderLayout2);
   insetsPanel1.setLayout(flowLayout1);
   insetsPanel2.setLayout(flowLayout1);
   insetsPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
   gridLayout1.setRows(4);
   gridLayout1.setColumns(1);
   label1.setText(product);
   label2.setText(version);
   label3.setText(copyright);
   label4.setText(comments);
   insetsPanel3.setLayout(gridLayout1);
   insetsPanel3.setBorder(BorderFactory.createEmptyBorder(10, 60, 10, 10));
   button1.setText("OK");
   button1.addActionListener(this);
   insetsPanel2.add(imageLabel, null);
   panel2.add(insetsPanel2, BorderLayout.WEST);
   getContentPane().add(panel1, null);
   insetsPanel3.add(label1, null);
   insetsPanel3.add(label2, null);
   insetsPanel3.add(label3, null);
   insetsPanel3.add(label4, null);
   panel2.add(insetsPanel3, BorderLayout.CENTER);
   insetsPanel1.add(button1, null);
   panel1.add(insetsPanel1, BorderLayout.SOUTH);
   panel1.add(panel2, BorderLayout.NORTH);
   setResizable(true);
 }
コード例 #4
0
 private JPanel getJPanel1() {
   if (jPanel1 == null) {
     jPanel1 = new JPanel();
     GridLayout jPanel1Layout = new GridLayout(7, 2);
     jPanel1Layout.setColumns(2);
     jPanel1Layout.setHgap(5);
     jPanel1Layout.setVgap(5);
     jPanel1Layout.setRows(7);
     jPanel1.setLayout(jPanel1Layout);
     jPanel1.add(getJLabel1());
     jPanel1.add(getJTextField1());
     jPanel1.add(getJLabel2());
     jPanel1.add(getJTextField2());
     jPanel1.add(getJLabel3());
     jPanel1.add(getJTextField3());
     jPanel1.add(getJLabel4());
     jPanel1.add(getJTextField4());
     jPanel1.add(getJLabel5());
     jPanel1.add(getJTextField5());
     jPanel1.add(getJLabel6());
     jPanel1.add(getJTextField6());
     jPanel1.add(getJLabel7());
     jPanel1.add(getJTextField7());
   }
   return jPanel1;
 }
コード例 #5
0
ファイル: BoxLayout.java プロジェクト: puppeh/chipmunk
 /**
  * Adds a component to the layout.
  *
  * @param name The name of the component to add.
  * @param component the component to add to the layout.
  */
 public void addLayoutComponent(String name, Component component) {
   if (way == X_AXIS
       || (way == LINE_AXIS && component.getComponentOrientation().isHorizontal())
       || (way == PAGE_AXIS && !component.getComponentOrientation().isHorizontal()))
     grid.setColumns(grid.getColumns() + 1);
   else grid.setRows(grid.getRows() + 1);
 }
コード例 #6
0
ファイル: ModuleJPanel.java プロジェクト: igmar/HUSACCT
 private GridLayout createButtonPanelLayout() {
   GridLayout buttonPanelLayout = new GridLayout(2, 2);
   buttonPanelLayout.setColumns(2);
   buttonPanelLayout.setHgap(5);
   buttonPanelLayout.setVgap(5);
   buttonPanelLayout.setRows(2);
   return buttonPanelLayout;
 }
コード例 #7
0
ファイル: AbstractScreen.java プロジェクト: jr-news/cop5339
 /**
  * Sets up the BrowsePanel, in preparation for being populated with lines of Product information.
  */
 public void createBrowsePanel() {
   GridLayout grid = new GridLayout();
   grid.setColumns(1);
   browsePanel.setLayout(grid);
   JScrollPane scrollPane = new JScrollPane(browsePanel);
   scrollPane.getVerticalScrollBar().setUnitIncrement(12);
   this.add(scrollPane, BorderLayout.CENTER);
 }
コード例 #8
0
  public void addCarrier(FireflyCarrier carrier) {
    list.add(carrier);
    add(carrier);

    int columns = (int) Math.floor(Math.sqrt(list.size()));
    gridLayout.setColumns(columns);
    gridLayout.setRows(list.size() / columns);
    updateUI();
  }
コード例 #9
0
 /**
  * This method initializes this
  *
  * @return void
  */
 private void initialize() {
   this.setSize(400, (1) * 30);
   java.awt.GridLayout layGridLayout = new java.awt.GridLayout(); // Generated
   layGridLayout.setColumns(1);
   layGridLayout.setRows(1); // Generated
   this.setLayout(layGridLayout); // Generated
   this.add(getJPanelseconds(), null); // Generated
   initActions();
 }
コード例 #10
0
ファイル: BoxLayout.java プロジェクト: puppeh/chipmunk
  /**
   * Removes a component from the layout.
   *
   * @param component The component to remove from the layout.
   */
  public void removeLayoutComponent(Component component) {
    grid.removeLayoutComponent(component);

    if (way == X_AXIS
        || (way == LINE_AXIS && component.getComponentOrientation().isHorizontal())
        || (way == PAGE_AXIS && !component.getComponentOrientation().isHorizontal()))
      grid.setColumns(grid.getColumns() - 1);
    else grid.setRows(grid.getRows() - 1);
  }
コード例 #11
0
  public ListarHisClientes(Frame padre) {

    super((Frame) padre, true);
    try {
      // this.cod_cli=cod_cli;
      lblNombre = new JLabel();
      lblNombre.setText("Nombre:");
      lblNombre.setBounds(17, 15, 48, 16);
      txtNombre = new JTextField();
      txtNombre.setBounds(77, 13, 323, 20);

      pnlArriba = new JPanel();

      pnlAbajo = new JPanel();
      GridLayout pnlAbajoLayout = new GridLayout(1, 1);
      pnlAbajoLayout.setHgap(5);
      pnlAbajoLayout.setVgap(5);
      pnlAbajoLayout.setColumns(1);
      pnlAbajo.setLayout(pnlAbajoLayout);
      getContentPane().add(pnlAbajo, BorderLayout.CENTER);
      pnlAbajo.setPreferredSize(new java.awt.Dimension(859, 429));

      getContentPane().add(pnlArriba, BorderLayout.NORTH);
      pnlArriba.setPreferredSize(new java.awt.Dimension(892, 42));
      pnlArriba.setLayout(null);
      pnlArriba.add(lblNombre);
      pnlArriba.add(txtNombre);

      btnBuscar = new JButton();
      pnlArriba.add(btnBuscar);
      btnBuscar.setText("Buscar");
      btnBuscar.setBounds(325, 10, 81, 26);
      btnBuscar.setVisible(false);
      btnBuscar.addActionListener(this);

      jPanel1 = new JPanel();
      getContentPane().add(jPanel1, BorderLayout.SOUTH);
      jPanel1.setPreferredSize(new java.awt.Dimension(412, 5));

      jScrollPane1 = new JScrollPane();
      pnlAbajo.add(jScrollPane1);
      jScrollPane1.setPreferredSize(new java.awt.Dimension(859, 467));

      jTable1 = new JTable();
      jScrollPane1.setViewportView(jTable1);
      jTable1.setModel(modelo2);
      jTable1.addMouseListener(this);

      this.setSize(428, 266);
      getNombre(ConfigurarCuentas.cod_cli);
      listarXcod(ConfigurarCuentas.cod_cli);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
コード例 #12
0
 /**
  * This method initializes jContentPane
  *
  * @return javax.swing.JPanel
  */
 private JPanel getJContentPane() {
   if (jContentPane == null) {
     GridLayout gridLayout = new GridLayout();
     gridLayout.setRows(1);
     gridLayout.setColumns(2);
     jContentPane = new JPanel();
     jContentPane.setLayout(gridLayout);
     jContentPane.add(getJPanel1(), null);
     jContentPane.add(getJPanel(), null);
   }
   return jContentPane;
 }
コード例 #13
0
 /**
  * This method initializes this
  *
  * @return void
  */
 private void initialize() {
   this.setSize(400, (4) * 30);
   java.awt.GridLayout layGridLayout = new java.awt.GridLayout(); // Generated
   layGridLayout.setColumns(1);
   layGridLayout.setRows(4); // Generated
   this.setLayout(layGridLayout); // Generated
   this.add(getJPanelfamily(), null); // Generated
   this.add(getJPanelcolmatch(), null); // Generated
   this.add(getJPanelvalue(), null); // Generated
   this.add(getJPanelprefix(), null); // Generated
   initActions();
 }
コード例 #14
0
ファイル: DialogUI.java プロジェクト: OlivierGEY1/rapla
 protected JComponent createButtonPanel() {
   GridLayout gridLayout = new GridLayout();
   JPanel jPanelButtons = new JPanel();
   jPanelButtons.setLayout(gridLayout);
   gridLayout.setRows(1);
   gridLayout.setHgap(10);
   gridLayout.setVgap(5);
   gridLayout.setColumns(buttons.length);
   for (int i = 0; i < buttons.length; i++) {
     jPanelButtons.add(buttons[i]);
   }
   return jPanelButtons;
 }
コード例 #15
0
 /**
  * This method initializes jContentPane
  *
  * @return javax.swing.JPanel
  */
 private JPanel getJContentPane() {
   if (jContentPane == null) {
     GridLayout gridLayout = new GridLayout();
     gridLayout.setRows(4);
     gridLayout.setColumns(1);
     jContentPane = new JPanel();
     jContentPane.setLayout(gridLayout);
     jContentPane.add(getLblNewLabel());
     jContentPane.add(getBoton3(), null);
     jContentPane.add(getBoton2(), null);
     jContentPane.add(getBoton1(), null);
   }
   return jContentPane;
 }
コード例 #16
0
 /**
  * This method initializes jPanel
  *
  * @return javax.swing.JPanel
  */
 private JPanel getJPanel() {
   if (jPanel == null) {
     GridLayout gridLayout = new GridLayout();
     gridLayout.setRows(1);
     gridLayout.setHgap(10);
     gridLayout.setVgap(10);
     gridLayout.setColumns(2);
     jPanel = new JPanel();
     jPanel.setLayout(gridLayout);
     jPanel.add(getJButton(), null);
     jPanel.add(getJButton1(), null);
   }
   return jPanel;
 }
コード例 #17
0
ファイル: GUI.java プロジェクト: kryukov/jimm-multi
 /**
  * This method initializes legendPanel
  *
  * @return javax.swing.JPanel
  */
 private JPanel getLegendPanel() {
   GridLayout gridLayout = new GridLayout();
   gridLayout.setRows(2);
   gridLayout.setHgap(3);
   gridLayout.setVgap(3);
   gridLayout.setColumns(2);
   JPanel legendPanel = new JPanel();
   legendPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(3, 3, 3, 3));
   legendPanel.setLayout(gridLayout);
   addToLegend(legendPanel, "Key was found in base and compare file", Color.white);
   addToLegend(legendPanel, "Key was found in compare but not in base", Color.red);
   addToLegend(legendPanel, "Text for this key was changed but not saved yet", Color.orange);
   addToLegend(legendPanel, "Key was not found in compare file", Color.yellow);
   return legendPanel;
 }
コード例 #18
0
 /**
  * This method initializes jPanel_TitleArea
  *
  * @return javax.swing.JPanel
  */
 private JPanel getJPanel_TitleArea() {
   if (jPanel_TitleArea == null) {
     GridLayout gridLayout = new GridLayout();
     gridLayout.setRows(2);
     gridLayout.setHgap(0);
     gridLayout.setColumns(0);
     gridLayout.setVgap(10);
     jPanel_TitleArea = new JPanel();
     jPanel_TitleArea.setLayout(gridLayout);
     jPanel_TitleArea.setName("jPanel2");
     jPanel_TitleArea.add(jLabel_Title, null);
     jPanel_TitleArea.add(getJPanel_ExplArea1(), null);
   }
   return jPanel_TitleArea;
 }
コード例 #19
0
 /**
  * This method initializes this
  *
  * @return void
  */
 private void initialize() {
   labelStatus = new JLabel();
   labelStatus.setText("PARADO");
   labelStatus.setFont(new Font("Dialog", Font.BOLD, 12));
   labelStatus.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED);
   labelStatus.setForeground(Color.red);
   labelStatus.setHorizontalAlignment(SwingConstants.CENTER);
   GridLayout gridLayout = new GridLayout();
   gridLayout.setRows(1);
   gridLayout.setColumns(2);
   this.setLayout(gridLayout);
   this.setSize(300, 28);
   this.add(getButtonIniciar(), null);
   this.add(getButtonParar(), null);
   this.add(labelStatus, null);
 }
コード例 #20
0
 public void resetPanel(Solution solution) {
   removeAll();
   Manners2009 manners2009 = (Manners2009) solution;
   gridLayout.setColumns((int) Math.ceil(Math.sqrt(manners2009.getTableList().size())));
   Map<Seat, SeatPanel> seatPanelMap =
       new HashMap<Seat, SeatPanel>(manners2009.getSeatList().size());
   SeatPanel unassignedPanel = new SeatPanel(null);
   seatPanelMap.put(null, unassignedPanel);
   for (Table table : manners2009.getTableList()) {
     // Formula: 4(columns - 1) = tableSize
     int edgeLength = (int) Math.ceil(((double) (table.getSeatList().size() + 4)) / 4.0);
     JPanel tablePanel = new JPanel(new GridLayout(0, edgeLength));
     tablePanel.setBorder(
         BorderFactory.createCompoundBorder(
             BorderFactory.createEmptyBorder(5, 5, 5, 5),
             BorderFactory.createTitledBorder("Table " + table.getTableIndex())));
     add(tablePanel);
     for (int y = 0; y < edgeLength; y++) {
       for (int x = 0; x < edgeLength; x++) {
         int index;
         if (y == 0) {
           index = x;
         } else if (x == (edgeLength - 1)) {
           index = (edgeLength - 1) + y;
         } else if (y == (edgeLength - 1)) {
           index = 2 * (edgeLength - 1) + (edgeLength - 1 - x);
         } else if (x == 0) {
           index = 3 * (edgeLength - 1) + (edgeLength - 1 - y);
         } else {
           index = Integer.MAX_VALUE;
         }
         if (index < table.getSeatList().size()) {
           Seat seat = table.getSeatList().get(index);
           SeatPanel seatPanel = new SeatPanel(seat);
           tablePanel.add(seatPanel);
           seatPanelMap.put(seat, seatPanel);
         } else {
           tablePanel.add(new JPanel());
         }
       }
     }
   }
   for (SeatDesignation seatDesignation : manners2009.getSeatDesignationList()) {
     SeatPanel seatPanel = seatPanelMap.get(seatDesignation.getSeat());
     seatPanel.addSeatDesignation(seatDesignation);
   }
 }
コード例 #21
0
    public MonthPanel(DatePicker parent, Calendar c) {
      this.parent = parent;
      GridLayout g = new GridLayout();
      g.setColumns(7);
      g.setRows(0);
      this.setLayout(g);

      for (int i = 0; i < 7; i++) {
        JLabel wd = new JLabel(parent.getString("week." + i, ""));
        wd.setHorizontalAlignment(SwingConstants.CENTER);
        if (i == 0) wd.setForeground(Color.RED);
        else if (i == 6) wd.setForeground(Color.gray);
        this.add(wd);
      }
      setDaysOfMonth(c);
      this.setPreferredSize(new Dimension(200, 120));
    }
コード例 #22
0
ファイル: FormDialog.java プロジェクト: charliemaiors/snai
 private void preinitGUI() {
   try {
     setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
     this.setResizable(false);
     {
       titleLabel = new JLabel();
       getContentPane().add(titleLabel, BorderLayout.NORTH);
       titleLabel.setFont(new java.awt.Font("Segoe UI", 1, 20));
       titleLabel.setPreferredSize(new java.awt.Dimension(434, 62));
       titleLabel.setHorizontalTextPosition(SwingConstants.CENTER);
       titleLabel.setText("TITOLO");
     }
     {
       buttonContainer = new JPanel();
       FlowLayout buttonContainerLayout = new FlowLayout();
       buttonContainerLayout.setAlignment(FlowLayout.RIGHT);
       buttonContainer.setLayout(buttonContainerLayout);
       getContentPane().add(buttonContainer, BorderLayout.SOUTH);
       {
         cancelButton = new JButton();
         buttonContainer.add(cancelButton);
         cancelButton.setText("Annulla");
         cancelButton.addActionListener(this);
       }
       {
         okButton = new JButton();
         buttonContainer.add(okButton);
         okButton.setText("Ok");
         okButton.addActionListener(this);
       }
     }
     {
       contentPanel = new JPanel();
       GridLayout contentPanelLayout = new GridLayout(1, 1);
       contentPanelLayout.setColumns(1);
       contentPanelLayout.setHgap(5);
       contentPanelLayout.setVgap(5);
       contentPanel.setLayout(contentPanelLayout);
       getContentPane().add(contentPanel, BorderLayout.CENTER);
       contentPanel.setPreferredSize(new java.awt.Dimension(434, 236));
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
コード例 #23
0
  /**
   * Erstellt die grafische Oberfläche.
   *
   * @throws Exception
   */
  private void jbInit() throws Exception {
    contentPane = (JPanel) this.getContentPane();
    m_agentLabel.setBorder(BorderFactory.createEtchedBorder());
    m_agentLabel.setMaximumSize(new Dimension(150, 20));
    m_agentLabel.setMinimumSize(new Dimension(150, 20));
    m_agentLabel.setPreferredSize(new Dimension(150, 20));
    m_agentLabel.setToolTipText("Name des Agenten");
    m_agentLabel.setText("Agenten Name:");
    m_gridLayout.setColumns(3);
    m_gridLayout.setHgap(10);
    m_gridLayout.setRows(4);
    m_gridLayout.setVgap(10);
    contentPane.setLayout(m_gridLayout);
    this.setSize(new Dimension(581, 212));
    this.setTitle("Agentenanmeldung");
    contentPane.setMaximumSize(new Dimension(300, 32767));
    contentPane.setMinimumSize(new Dimension(300, 80));
    contentPane.setPreferredSize(new Dimension(300, 80));
    m_agentClass.setBorder(BorderFactory.createEtchedBorder());
    m_agentClass.setText("Klasse des Agenten:");
    m_serverLabel.setBorder(BorderFactory.createEtchedBorder());
    m_serverLabel.setText("Source-Server:");
    m_agentTF.setText("");
    m_roVButton.setBorder(BorderFactory.createRaisedBevelBorder());
    m_roVButton.setActionCommand("Registriere Agent ohne Visualisierung");
    m_roVButton.setText("Registriere Agent ohne Visualisierung");
    m_roVButton.addActionListener(new AgentRegistrationFrame_m_roVButton_actionAdapter(this));
    m_rwVAgentButton.setBorder(BorderFactory.createRaisedBevelBorder());
    m_rwVAgentButton.setText("Registriere Agent mit Visualisierung");
    m_rwVAgentButton.addActionListener(
        new AgentRegistrationFrame_m_rwVAgentButton_actionAdapter(this));

    m_rwVAgentButton.setVisible(false); // später auf true setzten

    m_agentClassCombo = new JComboBox(this.getAgentClasses());
    m_serverTF.setText("http://localhost:2003/");
    contentPane.add(m_agentLabel, null);
    contentPane.add(m_agentTF, null);
    contentPane.add(m_agentClass, null);
    contentPane.add(m_agentClassCombo, null);
    contentPane.add(m_serverLabel, null);
    contentPane.add(m_serverTF, null);
    contentPane.add(m_roVButton, null);
    contentPane.add(m_rwVAgentButton, null);
  }
コード例 #24
0
 // ------------------------------------------------------------------------------------------------
 // 描述:
 // 设计: Skyline(2001.12.29)
 // 实现: Skyline
 // 修改:
 // ------------------------------------------------------------------------------------------------
 private void jbInit() throws Exception {
   bnAutoColor.setFont(new java.awt.Font("Dialog", 0, 12));
   bnAutoColor.setActionCommand("bnAutoColor");
   bnAutoColor.setText(res.getString("String_3"));
   jPanel1.setLayout(borderLayout1);
   jPanel3.setLayout(gridLayout1);
   gridLayout1.setColumns(8);
   gridLayout1.setRows(7);
   jPanel2.setLayout(borderLayout2);
   this.getContentPane().add(jPanel1, BorderLayout.CENTER);
   jPanel1.add(jPanel3, BorderLayout.CENTER);
   jPanel1.add(jPanel2, BorderLayout.NORTH);
   jPanel2.add(bnAutoColor, BorderLayout.CENTER);
   //    this.setDefaultCloseOperation();
   setSize(200, 220);
   setTitle(res.getString("String_4"));
   this.addWindowFocusListener(this);
   InitButton();
 }
コード例 #25
0
ファイル: AboutBox.java プロジェクト: srnsw/xena
 private void jbInit() throws Exception {
   // imageLabel.setIcon(new ImageIcon(ViewFrame_AboutBox.class.getResource("[Your Image]")));
   this.setTitle("About");
   version = postScriptPane.getVersion();
   setResizable(false);
   panel1.setLayout(borderLayout1);
   panel2.setLayout(borderLayout2);
   insetsPanel1.setLayout(flowLayout1);
   insetsPanel2.setLayout(flowLayout1);
   insetsPanel2.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
   gridLayout1.setRows(4);
   gridLayout1.setColumns(1);
   label1.setText(product);
   label2.setText(version);
   label3.setText(copyright);
   label4.setText(comments);
   insetsPanel3.setLayout(gridLayout1);
   insetsPanel3.setBorder(BorderFactory.createEmptyBorder(10, 60, 10, 10));
   okButton.setText("Ok");
   okButton.addActionListener(this);
   printButton.setText("Print");
   printButton.addActionListener(
       new java.awt.event.ActionListener() {
         public void actionPerformed(ActionEvent e) {
           printButtonAction(e);
         }
       });
   insetsPanel2.add(imageLabel, null);
   panel2.add(insetsPanel3, BorderLayout.CENTER);
   insetsPanel3.add(label1, null);
   insetsPanel3.add(label2, null);
   insetsPanel3.add(label3, null);
   insetsPanel3.add(label4, null);
   panel2.add(insetsPanel2, BorderLayout.WEST);
   this.getContentPane().add(panel1, null);
   insetsPanel1.add(okButton, null);
   insetsPanel1.add(printButton, null);
   panel1.add(insetsPanel1, BorderLayout.SOUTH);
   panel1.add(panel2, BorderLayout.NORTH);
 }
コード例 #26
0
ファイル: UserOption.java プロジェクト: OlivierGEY1/rapla
 public void actionPerformed(ActionEvent arg0) {
   try {
     DialogUI dlg;
     JPanel content = new JPanel();
     GridLayout layout = new GridLayout();
     layout.setColumns(3);
     layout.setRows(2);
     content.setLayout(layout);
     content.add(new JLabel(getString("new_mail")));
     content.add(emailField);
     sendCode.setText(getString("send_code"));
     content.add(sendCode);
     sendCode.setAction(new EmailChangeActionB(emailField, codeField, validate));
     content.add(new JLabel(getString("code_message3") + "  "));
     codeField.setEnabled(false);
     content.add(codeField);
     validate.setText(getString("code_validate"));
     content.add(validate);
     addCopyPaste(emailField);
     addCopyPaste(codeField);
     dlg =
         DialogUI.create(
             getContext(),
             getComponent(),
             true,
             content,
             new String[] {getString("save"), getString("abort")});
     validate.setAction(new EmailChangeActionA(dlg));
     validate.setEnabled(false);
     dlg.setDefault(0);
     dlg.setTitle("Email");
     dlg.getButton(0).setAction(new EmailChangeActionC(getUserModule().getUser(), dlg));
     dlg.getButton(0).setEnabled(false);
     dlg.start();
   } catch (RaplaException ex) {
     showException(ex, getMainComponent());
   }
 }
コード例 #27
0
ファイル: ST133Setup.java プロジェクト: LucyScott/mdsplus
 private void jbInit() throws Exception {
   this.setWidth(700);
   this.setHeight(450);
   this.setDeviceType("ST133");
   this.setDeviceProvider("150.178.3.33");
   this.setDeviceTitle("ST133 CCD Controller");
   this.getContentPane().setLayout(borderLayout1);
   jPanel1.setLayout(gridLayout1);
   gridLayout1.setColumns(1);
   gridLayout1.setRows(4);
   jPanel2.setLayout(flowLayout1);
   flowLayout1.setAlignment(FlowLayout.LEFT);
   flowLayout1.setHgap(5);
   flowLayout1.setVgap(0);
   flowLayout2.setVgap(0);
   flowLayout2.setHgap(5);
   flowLayout2.setAlignment(FlowLayout.LEFT);
   jPanel3.setLayout(flowLayout2);
   flowLayout3.setVgap(0);
   flowLayout3.setHgap(5);
   flowLayout3.setAlignment(FlowLayout.LEFT);
   jPanel4.setLayout(flowLayout3);
   flowLayout4.setVgap(0);
   flowLayout4.setHgap(5);
   flowLayout4.setAlignment(FlowLayout.LEFT);
   jPanel5.setLayout(flowLayout4);
   deviceField1.setOffsetNid(1);
   deviceField1.setLabelString("Comment: ");
   deviceField1.setNumCols(30);
   deviceField1.setIdentifier("");
   deviceField2.setOffsetNid(2);
   deviceField2.setTextOnly(true);
   deviceField2.setLabelString("Ip Address: ");
   deviceField2.setIdentifier("");
   deviceChoice1.setChoiceIntValues(null);
   deviceChoice1.setChoiceFloatValues(null);
   deviceChoice1.setOffsetNid(3);
   deviceChoice1.setLabelString("Clock Mode: ");
   deviceChoice1.setChoiceItems(new String[] {"INTERNAL", "EXTERNAL"});
   deviceChoice1.setUpdateIdentifier("");
   deviceChoice1.setIdentifier("");
   deviceField3.setOffsetNid(4);
   deviceField3.setLabelString("Clock. Source: ");
   deviceField3.setNumCols(30);
   deviceField3.setIdentifier("");
   deviceField4.setOffsetNid(14);
   deviceField4.setLabelString("Exp. Time: ");
   deviceField4.setNumCols(15);
   deviceField4.setIdentifier("");
   deviceField5.setOffsetNid(18);
   deviceField5.setLabelString("Num. Frames:");
   deviceField5.setIdentifier("");
   deviceButtons1.setMethods(new String[] {"init", "store"});
   deviceField6.setOffsetNid(16);
   deviceField6.setLabelString("Cleans: ");
   deviceField6.setIdentifier("");
   deviceField7.setOffsetNid(17);
   deviceField7.setLabelString("Skip Cleans: ");
   deviceField7.setIdentifier("");
   deviceField8.setOffsetNid(19);
   deviceField8.setLabelString("Num. ROI");
   deviceField8.setIdentifier("");
   deviceTable1.setOffsetNid(20);
   deviceTable1.setNumCols(6);
   deviceTable1.setNumRows(10);
   deviceTable1.setIdentifier("");
   deviceTable1.setColumnNames(
       new String[] {"StartX", "EndX", "GroupX", "StartY", "EndY", "GroupY"});
   deviceTable1.setRowNames(null);
   deviceTable1.setDisplayRowNumber(true);
   this.getContentPane().add(deviceButtons1, BorderLayout.SOUTH);
   this.getContentPane().add(jPanel1, BorderLayout.NORTH);
   jPanel1.add(jPanel2, null);
   jPanel2.add(deviceField1, null);
   jPanel2.add(deviceField2, null);
   jPanel1.add(jPanel3, null);
   jPanel3.add(deviceChoice1, null);
   jPanel3.add(deviceField3, null);
   jPanel1.add(jPanel4, null);
   jPanel4.add(deviceField5, null);
   jPanel4.add(deviceField4, null);
   jPanel4.add(deviceDispatch1, null);
   jPanel1.add(jPanel5, null);
   jPanel5.add(deviceField6, null);
   jPanel5.add(deviceField7, null);
   jPanel5.add(deviceField8, null);
   this.getContentPane().add(deviceTable1, BorderLayout.CENTER);
 }
コード例 #28
0
  private void jbInit() throws Exception {
    this.getContentPane().setLayout(borderLayout1);
    this.setModal(true);
    this.setResizable(true);
    this.setTitle("API Account Settings");
    btnOK.setText("OK");
    btnOK.addActionListener(new DialogAccount_btnOK_actionAdapter(this));

    jPanelUNCredential.setDebugGraphicsOptions(0);
    jPanelUNCredential.setLayout(borderLayout2);
    jPanelTokenCredential.setLayout(borderLayout3);
    jPanel1.setLayout(borderLayout5);
    jPanelUNCHolder.setLayout(borderLayout6);
    jPanelTCHolder.setLayout(borderLayout7);
    jPanelAPIAccount.setLayout(gridLayout1);
    gridLayout1.setColumns(1);
    gridLayout1.setRows(3);
    jLabel1.setPreferredSize(new Dimension(80, 15));
    jLabel1.setText("DeveloperID:");
    jLabel3.setPreferredSize(new Dimension(80, 15));
    jLabel3.setText("Certificate:");
    gridLayout2.setColumns(1);
    gridLayout2.setRows(2);
    jLabel6.setText("Paste your token text or ");
    jPanel10.setLayout(borderLayout4);
    jLabel7.setText("        ");
    jLabel8.setToolTipText("");
    jLabel8.setText("        ");
    txtDeveloperID.setPreferredSize(new Dimension(120, 21));
    txtDeveloperID.setSelectionStart(10);
    txtDeveloperID.setText("");
    txtDeveloperID.addActionListener(new DialogAccount_txtDeveloperID_actionAdapter(this));
    txtCertificate.setPreferredSize(new Dimension(120, 21));
    txtCertificate.setText("");
    jPanelBottom.setLayout(borderLayout8);
    jPanel13.setLayout(gridLayout3);
    gridLayout3.setColumns(1);
    gridLayout3.setRows(3);
    jLabel9.setPreferredSize(new Dimension(90, 15));
    jLabel9.setText("API Server URL:");
    jLabel10.setPreferredSize(new Dimension(90, 15));
    jLabel10.setText("EPS Server URL:");
    txtApiServerUrl.setPreferredSize(new Dimension(280, 21));
    txtApiServerUrl.setText("");
    txtEpsServerUrl.setPreferredSize(new Dimension(280, 21));
    txtEpsServerUrl.setText("http://msa-e1.ebay.com/ws/eBayISAPI.dll?EpsBasicApp");
    txtEpsServerUrl.setColumns(0);
    jPanel16.setLayout(borderLayout9);
    jLabel2.setPreferredSize(new Dimension(80, 15));
    jLabel2.setText("ApplicationID:");
    txtApplicationID.setPreferredSize(new Dimension(120, 21));
    txtApplicationID.setRequestFocusEnabled(true);
    txtApplicationID.setText("");
    txtTokenData.setPreferredSize(new Dimension(50, 200));
    txtSigninUrl.setPreferredSize(new Dimension(280, 21));
    txtSigninUrl.setText("http://my.sandbox.ebay.com/ws/eBayISAPI.dll?SignIn");
    jLabel11.setPreferredSize(new Dimension(90, 15));
    jLabel11.setText("Sign-In URL:");
    jPanel13.setBorder(BorderFactory.createEtchedBorder());
    jScrollPane1.setPreferredSize(new Dimension(54, 40));
    btnCancel.setToolTipText("");
    btnCancel.setText("Cancel");
    btnCancel.addActionListener(new DialogAccount_btnCancel_actionAdapter(this));
    jPanelChoices.setLayout(borderLayout10);
    btnFetchToken.setText("Generate a New Token");
    btnFetchToken.addActionListener(new DialogAccount_btnFetchToken_actionAdapter(this));
    jPanel10.setPreferredSize(new Dimension(102, 40));
    jPanel16.setPreferredSize(new Dimension(400, 480));
    jPanelTokenCredential.setBorder(BorderFactory.createEtchedBorder());
    jPanelApiCredentials.setBorder(BorderFactory.createEtchedBorder());
    jPanelAppId.add(jLabel2, null);
    jPanelAppId.add(txtApplicationID, null);
    this.getContentPane().add(jPanelBottom, BorderLayout.SOUTH);
    jPanel10.add(jLabel7, BorderLayout.WEST);
    jPanel10.add(jLabel8, BorderLayout.EAST);
    jPanel10.add(jScrollPane1, BorderLayout.CENTER);
    jPanel16.add(jPanel13, BorderLayout.SOUTH);
    jScrollPane1.getViewport().add(txtTokenData, null);
    jPanelTokenCredential.add(jPanel11, BorderLayout.NORTH);
    jPanel11.add(jLabel6, null);
    jPanel11.add(btnFetchToken, null);
    jPanelTokenCredential.add(jPanel10, BorderLayout.CENTER);
    jPanelTCHolder.add(jPanelTokenCredential, BorderLayout.CENTER);
    this.getContentPane().add(jPanel16, BorderLayout.CENTER);
    jPanelDevId.add(jLabel1, null);
    jPanelDevId.add(txtDeveloperID, null);
    jPanelAPIAccount.add(jPanelDevId, null);
    jPanelCertificate.add(jLabel3, null);
    jPanelCertificate.add(txtCertificate, null);
    jPanel16.add(jPanelChoices, BorderLayout.CENTER);
    jPanelChoices.add(jPanelUNCHolder, BorderLayout.NORTH);
    jPanelAPIAccount.add(jPanelAppId, null);
    jPanelAPIAccount.add(jPanelCertificate, null);
    jPanelUNCHolder.add(jPanelUNCredential, BorderLayout.CENTER);
    jPanel16.add(jPanelApiCredentials, BorderLayout.NORTH);
    jPanelApiCredentials.add(jPanelAPIAccount, null);
    jPanelUNCredential.add(jPanel1, BorderLayout.SOUTH);
    jPanelChoices.add(jPanelTCHolder, BorderLayout.CENTER);
    jPanelBottom.add(jPanel12, BorderLayout.SOUTH);
    jPanel12.add(btnOK, null);
    jPanel12.add(btnCancel, null);
    jPanelApiServer.add(jLabel9, null);
    jPanelApiServer.add(txtApiServerUrl, null);
    jPanel13.add(jPanelEpsServer, null);
    jPanel13.add(jPanelApiServer, null);
    jPanelEpsServer.add(jLabel10, null);
    jPanelEpsServer.add(txtEpsServerUrl, null);
    jPanel13.add(jPanelSignInUrl, null);
    jPanelSignInUrl.add(jLabel11, null);
    jPanelSignInUrl.add(txtSigninUrl, null);
  }
コード例 #29
0
ファイル: CADHSetup.java プロジェクト: LucyScott/mdsplus
 private void jbInit() throws Exception {
   this.setWidth(580);
   this.setHeight(450);
   this.setDeviceType("CADH");
   this.setDeviceProvider("localhost");
   this.setDeviceTitle("INCAA CADH 4 Channels Transient Recorder");
   this.getContentPane().setLayout(borderLayout1);
   jPanel1.setLayout(borderLayout2);
   deviceChannel1.setLabelString("Ch1:  ");
   deviceChannel1.setOffsetNid(10);
   deviceChannel1.setBorderVisible(true);
   deviceChannel1.setInSameLine(true);
   deviceChannel1.setUpdateIdentifier("");
   deviceChannel1.setShowVal("");
   deviceChannel1.setLayout(flowLayout1);
   jPanel3.setLayout(gridLayout1);
   gridLayout1.setColumns(1);
   gridLayout1.setRows(4);
   jPanel5.setLayout(flowLayout2);
   deviceField2.setOffsetNid(11);
   deviceField2.setLabelString("Start: ");
   deviceField2.setIdentifier("");
   deviceField1.setOffsetNid(12);
   deviceField1.setLabelString("End: ");
   deviceField1.setIdentifier("");
   deviceField3.setIdentifier("");
   deviceField3.setLabelString("End: ");
   deviceField3.setOffsetNid(30);
   deviceChannel2.setLayout(flowLayout3);
   deviceChannel2.setShowVal("");
   deviceChannel2.setUpdateIdentifier("");
   deviceChannel2.setInSameLine(true);
   deviceChannel2.setBorderVisible(true);
   deviceChannel2.setOffsetNid(28);
   deviceChannel2.setLabelString("Ch4:  ");
   jPanel6.setLayout(flowLayout4);
   deviceField4.setOffsetNid(29);
   deviceField4.setLabelString("Start: ");
   deviceField4.setIdentifier("");
   deviceField5.setIdentifier("");
   deviceField5.setLabelString("End: ");
   deviceField5.setOffsetNid(24);
   deviceChannel3.setLayout(flowLayout5);
   deviceChannel3.setShowVal("");
   deviceChannel3.setUpdateIdentifier("");
   deviceChannel3.setInSameLine(true);
   deviceChannel3.setBorderVisible(true);
   deviceChannel3.setOffsetNid(22);
   deviceChannel3.setLabelString("Ch3:  ");
   jPanel7.setLayout(flowLayout6);
   deviceField6.setOffsetNid(23);
   deviceField6.setLabelString("Start: ");
   deviceField6.setIdentifier("");
   deviceField7.setIdentifier("");
   deviceField7.setLabelString("End: ");
   deviceField7.setOffsetNid(18);
   deviceChannel4.setLayout(flowLayout7);
   deviceChannel4.setShowVal("");
   deviceChannel4.setUpdateIdentifier("");
   deviceChannel4.setInSameLine(true);
   deviceChannel4.setBorderVisible(true);
   deviceChannel4.setOffsetNid(16);
   deviceChannel4.setLabelString("Ch2:  ");
   jPanel8.setLayout(flowLayout8);
   deviceField8.setOffsetNid(17);
   deviceField8.setLabelString("Start: ");
   deviceField8.setIdentifier("");
   jPanel4.setLayout(gridLayout2);
   gridLayout2.setColumns(1);
   gridLayout2.setRows(4);
   deviceChannel5.setLabelString("Ch1: ");
   deviceChannel5.setOffsetNid(10);
   deviceChannel5.setBorderVisible(true);
   deviceChannel5.setInSameLine(true);
   deviceChannel5.setUpdateIdentifier("");
   deviceChannel5.setShowVal("");
   deviceChannel5.setLayout(flowLayout14);
   jPanel9.setLayout(flowLayout9);
   deviceField10.setOffsetNid(13);
   deviceField10.setLabelString("Start Idx: ");
   deviceField10.setIdentifier("");
   deviceField9.setOffsetNid(14);
   deviceField9.setLabelString("End Idx: ");
   deviceField9.setIdentifier("");
   deviceField11.setIdentifier("");
   deviceField11.setLabelString("Start Idx: ");
   deviceField11.setOffsetNid(31);
   deviceField12.setIdentifier("");
   deviceField12.setLabelString("End Idx: ");
   deviceField12.setOffsetNid(32);
   jPanel10.setLayout(flowLayout10);
   deviceChannel6.setLabelString("Ch4: ");
   deviceChannel6.setOffsetNid(28);
   deviceChannel6.setBorderVisible(true);
   deviceChannel6.setInSameLine(true);
   deviceChannel6.setUpdateIdentifier("");
   deviceChannel6.setShowVal("");
   deviceChannel6.setLayout(flowLayout16);
   deviceField13.setIdentifier("");
   deviceField13.setLabelString("Start Idx: ");
   deviceField13.setOffsetNid(25);
   deviceField14.setIdentifier("");
   deviceField14.setLabelString("End Idx: ");
   deviceField14.setOffsetNid(26);
   jPanel11.setLayout(flowLayout11);
   deviceChannel7.setLabelString("Ch3: ");
   deviceChannel7.setOffsetNid(22);
   deviceChannel7.setBorderVisible(true);
   deviceChannel7.setInSameLine(true);
   deviceChannel7.setUpdateIdentifier("");
   deviceChannel7.setShowVal("");
   deviceChannel7.setLayout(flowLayout15);
   deviceField15.setIdentifier("");
   deviceField15.setLabelString("Start Idx: ");
   deviceField15.setOffsetNid(19);
   deviceField16.setIdentifier("");
   deviceField16.setLabelString("End Idx: ");
   deviceField16.setOffsetNid(20);
   jPanel12.setLayout(flowLayout12);
   deviceChannel8.setLabelString("Ch2: ");
   deviceChannel8.setOffsetNid(16);
   deviceChannel8.setBorderVisible(true);
   deviceChannel8.setInSameLine(true);
   deviceChannel8.setUpdateIdentifier("");
   deviceChannel8.setShowVal("");
   deviceChannel8.setLayout(flowLayout13);
   jPanel2.setLayout(gridLayout3);
   gridLayout3.setColumns(1);
   gridLayout3.setRows(4);
   deviceField17.setOffsetNid(1);
   deviceField17.setTextOnly(true);
   deviceField17.setLabelString("CAMAC Name: ");
   deviceField17.setIdentifier("");
   deviceChoice1.setChoiceIntValues(null);
   deviceChoice1.setChoiceFloatValues(null);
   deviceChoice1.setOffsetNid(8);
   deviceChoice1.setLabelString("Use Time: ");
   deviceChoice1.setChoiceItems(new String[] {"TRUE", "FALSE"});
   deviceChoice1.setUpdateIdentifier("");
   deviceChoice1.setIdentifier("");
   deviceField18.setOffsetNid(2);
   deviceField18.setTextOnly(true);
   deviceField18.setLabelString("Comment: ");
   deviceField18.setNumCols(35);
   deviceField18.setIdentifier("");
   deviceField20.setOffsetNid(6);
   deviceField20.setLabelString("Clock Source: ");
   deviceField20.setNumCols(15);
   deviceField20.setIdentifier("");
   deviceField19.setOffsetNid(5);
   deviceField19.setLabelString("Trig. Source: ");
   deviceField19.setNumCols(15);
   deviceField19.setIdentifier("");
   deviceChoice4.setChoiceIntValues(null);
   deviceChoice4.setChoiceFloatValues(null);
   deviceChoice4.setOffsetNid(4);
   deviceChoice4.setLabelString("Clock Mode: ");
   deviceChoice4.setChoiceItems(new String[] {"INTERNAL", "EXTERNAL"});
   deviceChoice4.setUpdateIdentifier("");
   deviceChoice4.setIdentifier("");
   deviceChoice3.setChoiceIntValues(null);
   deviceChoice3.setChoiceFloatValues(
       new float[] {
         (float) 500000.0,
         (float) 250000.0,
         (float) 125000.0,
         (float) 50000.0,
         (float) 10000.0,
         (float) 5000.0,
         (float) 1000.0,
         (float) 500.0
       });
   deviceChoice3.setOffsetNid(7);
   deviceChoice3.setLabelString("Frequency: ");
   deviceChoice3.setChoiceItems(
       new String[] {"500E3", "250E3", "125E3", "50E3", "10E3", "5E3", "1E3", "500"});
   deviceChoice3.setUpdateIdentifier("");
   deviceChoice3.setIdentifier("");
   deviceChoice2.setChoiceIntValues(new int[] {(int) 1, (int) 2, (int) 4});
   deviceChoice2.setChoiceFloatValues(null);
   deviceChoice2.setOffsetNid(3);
   deviceChoice2.setLabelString("Num. Channels: ");
   deviceChoice2.setChoiceItems(new String[] {"1", "2", "4"});
   deviceChoice2.setUpdateIdentifier("");
   deviceChoice2.setIdentifier("");
   deviceButtons1.setCheckExpressions(null);
   deviceButtons1.setCheckMessages(null);
   deviceButtons1.setMethods(new String[] {"INIT", "TRIGGER", "STORE"});
   this.getContentPane().add(deviceButtons1, BorderLayout.SOUTH);
   this.getContentPane().add(jPanel1, BorderLayout.NORTH);
   jPanel1.add(jPanel2, BorderLayout.CENTER);
   jPanel2.add(jPanel13, null);
   jPanel13.add(deviceField17, null);
   jPanel13.add(deviceDispatch1, null);
   jPanel13.add(deviceChoice1, null);
   jPanel2.add(jPanel16, null);
   jPanel16.add(deviceField18, null);
   jPanel2.add(jPanel15, null);
   jPanel15.add(deviceField20, null);
   jPanel15.add(deviceField19, null);
   jPanel2.add(jPanel14, null);
   jPanel14.add(deviceChoice4, null);
   jPanel14.add(deviceChoice3, null);
   jPanel14.add(deviceChoice2, null);
   jPanel1.add(jTabbedPane1, BorderLayout.SOUTH);
   jTabbedPane1.add(jPanel3, "Channels (Time)");
   jPanel3.add(deviceChannel1, null);
   deviceChannel1.add(jPanel5, null);
   jPanel5.add(deviceField2, null);
   jPanel5.add(deviceField1, null);
   jPanel3.add(deviceChannel4, null);
   deviceChannel4.add(jPanel8, null);
   jPanel8.add(deviceField8, null);
   jPanel8.add(deviceField7, null);
   jPanel3.add(deviceChannel3, null);
   deviceChannel3.add(jPanel7, null);
   jPanel7.add(deviceField6, null);
   jPanel7.add(deviceField5, null);
   jPanel3.add(deviceChannel2, null);
   deviceChannel2.add(jPanel6, null);
   jPanel6.add(deviceField4, null);
   jPanel6.add(deviceField3, null);
   jTabbedPane1.add(jPanel4, "Channels (Samples)");
   jPanel4.add(deviceChannel5, null);
   deviceChannel5.add(jPanel9, null);
   jPanel9.add(deviceField10, null);
   jPanel9.add(deviceField9, null);
   jPanel4.add(deviceChannel8, null);
   deviceChannel8.add(jPanel12, null);
   jPanel12.add(deviceField15, null);
   jPanel12.add(deviceField16, null);
   jPanel4.add(deviceChannel7, null);
   deviceChannel7.add(jPanel11, null);
   jPanel11.add(deviceField13, null);
   jPanel11.add(deviceField14, null);
   jPanel4.add(deviceChannel6, null);
   deviceChannel6.add(jPanel10, null);
   jPanel10.add(deviceField11, null);
   jPanel10.add(deviceField12, null);
 }
コード例 #30
0
  public CharSelection(JFrame parent) {
    this.parent = parent;
    JPanel holder = new JPanel();
    GridLayout my_layout = new GridLayout();
    my_layout.setColumns(2);
    my_layout.setRows(5);
    holder.setLayout(my_layout);
    JButton selectArcher = new JButton("Archer");
    JButton selectFighter = new JButton("Fighter");
    JButton selectBlue = new JButton("Blue Caster");
    JButton selectRed = new JButton("Red Caster");
    JButton selectGreen = new JButton("Green Caster");
    JButton selectProphet = new JButton("Prophet");
    JButton upgrade = new JButton("Upgrade Units");
    JButton sell = new JButton("Sell Units");
    holder.add(selectArcher);
    holder.add(selectFighter);
    holder.add(selectBlue);
    holder.add(selectRed);
    holder.add(selectGreen);
    holder.add(selectProphet);
    holder.add(upgrade);
    holder.add(sell);
    sell.addActionListener(
        new ActionListener() {

          @Override
          public void actionPerformed(ActionEvent arg0) {
            // TODO Auto-generated method stub
            if (sellpanel.mouse.canSell) sellpanel.setVisible(true);
            else
              JOptionPane.showMessageDialog(
                  charHolder, "you do not have any units to sell at this time.");
          }
        });
    upgrade.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            if (cu.mouse.canUpgrade) cu.setVisible(true);
            else
              JOptionPane.showMessageDialog(
                  charHolder, "you do not have any units to upgrade at this time.");
          }
        });
    selectArcher.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            // TODO Auto-generated method stub
            FIGHTER = false;
            BLUE = false;
            RED = false;
            GREEN = false;
            PROPHET = false;
            if (!ARCHER) {
              ARCHER = true;
              JOptionPane.showMessageDialog(
                  charHolder,
                  "click on the map to deploy an archer there. deploying an archer costs 1000G");
            } else
              JOptionPane.showMessageDialog(
                  charHolder, "you're currently deploying an archer. do so already.");
          }
        });
    selectFighter.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            // TODO Auto-generated method stub
            ARCHER = false;
            BLUE = false;
            RED = false;
            GREEN = false;
            PROPHET = false;
            if (!FIGHTER) {
              FIGHTER = true;
              JOptionPane.showMessageDialog(
                  charHolder,
                  "click on the map to deploy a fighter there. deploying a fighter costs 1500G");
            } else
              JOptionPane.showMessageDialog(
                  charHolder, "you're currently deploying a fighter. do so already.");
          }
        });
    selectBlue.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            // TODO Auto-generated method stub
            ARCHER = false;
            FIGHTER = false;
            RED = false;
            GREEN = false;
            PROPHET = false;
            if (!BLUE) {
              BLUE = true;
              JOptionPane.showMessageDialog(
                  charHolder,
                  "click on the map to deploy a blue mage there. deploying a blue mage costs 2000G");
            } else
              JOptionPane.showMessageDialog(
                  charHolder, "you're currently deploying a blue mage. do so already.");
          }
        });
    selectRed.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            // TODO Auto-generated method stub
            ARCHER = false;
            FIGHTER = false;
            BLUE = false;
            GREEN = false;
            PROPHET = false;
            if (!RED) {
              RED = true;
              JOptionPane.showMessageDialog(
                  charHolder,
                  "click on the map to deploy a red mage there. deploying a red mage costs 2000G");
            } else
              JOptionPane.showMessageDialog(
                  charHolder, "you're currently deploying a red mage. do so already.");
          }
        });
    selectGreen.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            // TODO Auto-generated method stub
            ARCHER = false;
            FIGHTER = false;
            BLUE = false;
            RED = false;
            PROPHET = false;
            if (!GREEN) {
              GREEN = true;
              JOptionPane.showMessageDialog(
                  charHolder,
                  "click on the map to deploy a green mage there. deploying a green mage costs 2000G");
            } else
              JOptionPane.showMessageDialog(
                  charHolder, "you're currently deploying a green mage. do so already.");
          }
        });
    selectProphet.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            // TODO Auto-generated method stub
            ARCHER = false;
            FIGHTER = false;
            BLUE = false;
            RED = false;
            GREEN = false;
            if (!PROPHET) {
              PROPHET = true;
              JOptionPane.showMessageDialog(
                  charHolder,
                  "click on the map to deploy a prophet there. deploying a prophet costs 5000G");
            } else
              JOptionPane.showMessageDialog(
                  charHolder, "you're currently deploying a prophet. do so already.");
          }
        });
    charHolder.add(holder);
    charHolder.pack();
    charHolder.setLocation(parent.getX() + 27, parent.getY() + 220);
  }