// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {
    java.awt.GridBagConstraints gridBagConstraints;

    popupLabel1 = new javax.swing.JLabel();
    popupLabel2 = new javax.swing.JLabel();
    popupField = new javax.swing.JTextField();
    noteLabel = new javax.swing.JLabel();

    setLayout(new java.awt.GridBagLayout());

    popupLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    popupLabel1.setText(
        "<html>Open a popup menu here, which is having its top left corner under the mouse pointer.");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(20, 20, 20, 20);
    add(popupLabel1, gridBagConstraints);

    popupLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    popupLabel2.setText(
        "<html>Open a popup menu here which, is being centered unter the mouse pointer.");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.insets = new java.awt.Insets(20, 20, 20, 20);
    add(popupLabel2, gridBagConstraints);

    popupField.setText("Open a popup menu over this entry field.");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.insets = new java.awt.Insets(20, 20, 20, 20);
    add(popupField, gridBagConstraints);

    noteLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    noteLabel.setText(
        "<html>There are two ways to use a popup menu: <ul><li>Ctrl+Click to open the popup menu followed by a Click to choose a menu item.</li><li>Ctrl+Mouse Press to open the popup menu followed by a Mouse Release to choose a menu item</li></ul>");
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    gridBagConstraints.insets = new java.awt.Insets(20, 20, 20, 20);
    add(noteLabel, gridBagConstraints);
  } // </editor-fold>//GEN-END:initComponents
Ejemplo n.º 2
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  private void initComponents() { // GEN-BEGIN:initComponents
    java.awt.GridBagConstraints gridBagConstraints;

    CurrentPortrait = new javax.swing.JLabel();
    RaceCheck = new javax.swing.JCheckBox();
    SexCheck = new javax.swing.JCheckBox();
    PortraitScrollPane = new javax.swing.JScrollPane();
    PortraitsWindow = new javax.swing.JPanel();
    OKButton = new javax.swing.JButton();
    CancelButton = new javax.swing.JButton();
    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jPanel3 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jPanel5 = new javax.swing.JPanel();
    jPanel6 = new javax.swing.JPanel();
    jPanel7 = new javax.swing.JPanel();
    InfoText = new javax.swing.JTextField();
    FirstButton = new javax.swing.JButton();
    BackButton = new javax.swing.JButton();
    ForwardButton = new javax.swing.JButton();
    LastButton = new javax.swing.JButton();
    jPanel8 = new javax.swing.JPanel();
    jPanel9 = new javax.swing.JPanel();

    getContentPane().setLayout(new java.awt.GridBagLayout());

    setTitle("Portraits");
    setName("PortFrame");
    setResizable(false);
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowClosing(java.awt.event.WindowEvent evt) {
            exitForm(evt);
          }
        });

    CurrentPortrait.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/CharacterCreator/resource/portrait.jpg")));
    CurrentPortrait.setVerticalAlignment(javax.swing.SwingConstants.TOP);
    CurrentPortrait.setMaximumSize(new java.awt.Dimension(128, 200));
    CurrentPortrait.setMinimumSize(new java.awt.Dimension(128, 200));
    CurrentPortrait.setPreferredSize(new java.awt.Dimension(128, 200));
    CurrentPortrait.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    getContentPane().add(CurrentPortrait, gridBagConstraints);

    RaceCheck.setSelected(true);
    RaceCheck.setText("Lock To Race");
    RaceCheck.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            RaceCheckActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 4;
    getContentPane().add(RaceCheck, gridBagConstraints);

    SexCheck.setSelected(true);
    SexCheck.setText("Lock to Gender");
    SexCheck.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            SexCheckActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 3;
    getContentPane().add(SexCheck, gridBagConstraints);

    PortraitScrollPane.setHorizontalScrollBarPolicy(
        javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    PortraitScrollPane.setVerticalScrollBarPolicy(javax.swing.JScrollPane.VERTICAL_SCROLLBAR_NEVER);
    PortraitScrollPane.setMinimumSize(new java.awt.Dimension(640, 500));
    PortraitScrollPane.setPreferredSize(new java.awt.Dimension(658, 500));
    PortraitScrollPane.setAutoscrolls(true);
    PortraitsWindow.setLayout(new java.awt.GridLayout(0, 10));

    PortraitsWindow.setMaximumSize(new java.awt.Dimension(640, 500));
    PortraitsWindow.setMinimumSize(new java.awt.Dimension(640, 500));
    PortraitScrollPane.setViewportView(PortraitsWindow);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 6;
    gridBagConstraints.gridheight = 9;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(PortraitScrollPane, gridBagConstraints);

    OKButton.setText("OK");
    OKButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            OKButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 10;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH;
    getContentPane().add(OKButton, gridBagConstraints);

    CancelButton.setText("Cancel");
    CancelButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            CancelButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(CancelButton, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    getContentPane().add(jPanel1, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    getContentPane().add(jPanel2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 12;
    getContentPane().add(jPanel3, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 0;
    getContentPane().add(jPanel4, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 5;
    getContentPane().add(jPanel5, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 2;
    getContentPane().add(jPanel6, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 7;
    getContentPane().add(jPanel7, gridBagConstraints);

    InfoText.setBackground(new java.awt.Color(204, 204, 204));
    InfoText.setFont(new java.awt.Font("Dialog", 0, 10));
    InfoText.setForeground(new java.awt.Color(255, 0, 0));
    InfoText.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    InfoText.setBorder(null);
    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH;
    getContentPane().add(InfoText, gridBagConstraints);

    FirstButton.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/CharacterCreator/resource/first.gif")));
    FirstButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            FirstButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 11;
    getContentPane().add(FirstButton, gridBagConstraints);

    BackButton.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/CharacterCreator/resource/back.gif")));
    BackButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            BackButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 5;
    gridBagConstraints.gridy = 11;
    getContentPane().add(BackButton, gridBagConstraints);

    ForwardButton.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/CharacterCreator/resource/forward.gif")));
    ForwardButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            ForwardButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 7;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
    getContentPane().add(ForwardButton, gridBagConstraints);

    LastButton.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/CharacterCreator/resource/last.gif")));
    LastButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            LastButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 8;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;
    getContentPane().add(LastButton, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.ipadx = 4;
    gridBagConstraints.insets = new java.awt.Insets(0, 85, 0, 85);
    getContentPane().add(jPanel8, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 6;
    gridBagConstraints.gridy = 11;
    gridBagConstraints.insets = new java.awt.Insets(0, 25, 0, 25);
    getContentPane().add(jPanel9, gridBagConstraints);

    pack();
  } // GEN-END:initComponents
Ejemplo n.º 3
0
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  private void initComponents() { // GEN-BEGIN:initComponents
    java.awt.GridBagConstraints gridBagConstraints;

    RaceButtonContainer = new javax.swing.JScrollPane();
    RaceButtonBak = new javax.swing.JPanel();
    RaceButtonList = new javax.swing.JPanel();
    RecommendedButton = new javax.swing.JButton();
    OKButton = new javax.swing.JButton();
    CancelButton = new javax.swing.JButton();
    DescriptionContainer = new javax.swing.JScrollPane();
    DescriptionText = new javax.swing.JTextArea();
    PadPanel = new javax.swing.JPanel();
    PadPanel2 = new javax.swing.JPanel();
    PadPanel3 = new javax.swing.JPanel();
    PadPanel4 = new javax.swing.JPanel();
    jPanel16 = new javax.swing.JPanel();
    jPanel17 = new javax.swing.JPanel();

    getContentPane().setLayout(new java.awt.GridBagLayout());

    setTitle("Choose a Race for your character.");
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowClosing(java.awt.event.WindowEvent evt) {
            exitForm(evt);
          }
        });

    RaceButtonContainer.setHorizontalScrollBarPolicy(
        javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    RaceButtonContainer.setVerticalScrollBarPolicy(
        javax.swing.JScrollPane
            .VERTICAL_SCROLLBAR_ALWAYS); // was that weird green color on the menus
    RaceButtonContainer.setViewportBorder(
        new javax.swing.border.MatteBorder(
            new java.awt.Insets(10, 10, 10, 10), new java.awt.Color(0, 0, 0)));
    RaceButtonContainer.setMaximumSize(new java.awt.Dimension(32767, 300));
    RaceButtonContainer.setPreferredSize(new java.awt.Dimension(283, 300));
    RaceButtonContainer.setAutoscrolls(true);
    RaceButtonContainer.getVerticalScrollBar().setUnitIncrement(52);
    RaceButtonContainer.getVerticalScrollBar().setBlockIncrement(52);

    RaceButtonBak.setLayout(new java.awt.GridBagLayout());
    RaceButtonBak.setBackground(new java.awt.Color(0, 0, 0));
    RaceButtonBak.setForeground(new java.awt.Color(255, 255, 255)); // color not seen
    RaceButtonBak.setAlignmentX(0.0F);
    RaceButtonBak.setAlignmentY(0.0F);
    RaceButtonBak.setAutoscrolls(true);

    RaceButtonList.setLayout(new java.awt.GridLayout(0, 1));
    RaceButtonList.setBackground(new java.awt.Color(0, 0, 0)); // outline behind buttons
    RaceButtonList.setBorder(new javax.swing.border.EmptyBorder(new java.awt.Insets(3, 3, 3, 3)));

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.gridheight = 2;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    RaceButtonBak.add(RaceButtonList, gridBagConstraints);

    RaceButtonContainer.setViewportView(RaceButtonBak);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridheight = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(RaceButtonContainer, gridBagConstraints);

    RecommendedButton.setText("Recommended");
    RecommendedButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            RecommendedButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 1;
    gridBagConstraints.gridy = 8;
    getContentPane().add(RecommendedButton, gridBagConstraints);

    OKButton.setText("OK");
    OKButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            OKButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 8;
    getContentPane().add(OKButton, gridBagConstraints);

    CancelButton.setText("Cancel");
    CancelButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            CancelButtonActionPerformed(evt);
          }
        });

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 4;
    gridBagConstraints.gridy = 8;
    getContentPane().add(CancelButton, gridBagConstraints);

    DescriptionContainer.setHorizontalScrollBarPolicy(
        javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
    DescriptionContainer.setVerticalScrollBarPolicy(
        javax.swing.JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); // behind text description
    DescriptionContainer.setViewportBorder(
        new javax.swing.border.MatteBorder(
            new java.awt.Insets(10, 10, 10, 10), new java.awt.Color(0, 0, 0)));
    DescriptionContainer.setPreferredSize(new java.awt.Dimension(400, 300));
    DescriptionText.setBackground(new java.awt.Color(0, 0, 0));
    DescriptionText.setForeground(new java.awt.Color(240, 216, 130)); // text for description
    DescriptionText.setLineWrap(true);
    DescriptionText.setWrapStyleWord(true);
    DescriptionText.setPreferredSize(new java.awt.Dimension(400, 800));
    DescriptionText.setAutoscrolls(false);
    DescriptionContainer.setViewportView(DescriptionText);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 3;
    gridBagConstraints.gridy = 1;
    gridBagConstraints.gridwidth = 2;
    gridBagConstraints.gridheight = 6;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(DescriptionContainer, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 9;
    gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(PadPanel, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(PadPanel2, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(PadPanel3, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 5;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(PadPanel4, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 2;
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridheight = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(jPanel16, gridBagConstraints);

    gridBagConstraints = new java.awt.GridBagConstraints();
    gridBagConstraints.gridx = 0;
    gridBagConstraints.gridy = 7;
    gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
    gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;
    getContentPane().add(jPanel17, gridBagConstraints);

    pack();
  } // GEN-END:initComponents