コード例 #1
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.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jPanel1 = new javax.swing.JPanel();
    jPanel2 = new javax.swing.JPanel();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    jLabel6 = new javax.swing.JLabel();
    jLabel7 = new javax.swing.JLabel();
    jLabel8 = new javax.swing.JLabel();
    jLabel9 = new javax.swing.JLabel();
    jLabel10 = new javax.swing.JLabel();
    jLabel11 = new javax.swing.JLabel();
    jLabel12 = new javax.swing.JLabel();
    jLabel1 = new javax.swing.JLabel();
    canvas1 = new my_canvas(this);
    jLabel2 = new javax.swing.JLabel();
    jLabel13 = new javax.swing.JLabel();
    jLabel14 = new javax.swing.JLabel();
    jLabel15 = new javax.swing.JLabel();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenuItem1 = new javax.swing.JMenuItem();
    jMenuItem2 = new javax.swing.JMenuItem();
    jMenuItem3 = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    jMenuItem4 = new javax.swing.JMenuItem();
    jMenuItem5 = new javax.swing.JMenuItem();
    jMenuItem6 = new javax.swing.JMenuItem();
    jMenu3 = new javax.swing.JMenu();
    jMenuItem7 = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Robot Factory");
    setBounds(new java.awt.Rectangle(100, 40, 606, 606));
    setResizable(false);

    jPanel1.setPreferredSize(new java.awt.Dimension(616, 491));

    jPanel2.setPreferredSize(new java.awt.Dimension(117, 469));

    // jLabel3.setText("jLabel3");
    jLabel3.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel3.setName("jLabel3"); // NOI18N

    // jLabel4.setText("jLabel4");
    jLabel4.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel4.setName("jLabel4"); // NOI18N

    // jLabel5.setText("jLabel5");
    jLabel5.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel5.setName("jLabel5"); // NOI18N

    // jLabel6.setText("jLabel6");
    jLabel6.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel6.setName("jLabel6"); // NOI18N

    // jLabel7.setText("jLabel7");
    jLabel7.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel7.setName("jLabel7"); // NOI18N

    // jLabel8.setText("jLabel8");
    jLabel8.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel8.setName("jLabel8"); // NOI18N

    // jLabel9.setText("jLabel9");
    jLabel9.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel9.setName("jLabel9"); // NOI18N

    // jLabel10.setText("jLabel10");
    jLabel10.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel10.setMinimumSize(new java.awt.Dimension(34, 14));
    jLabel10.setName("jLabel10"); // NOI18N
    jLabel10.setPreferredSize(new java.awt.Dimension(34, 14));

    // jLabel11.setText("jLabel11");
    jLabel11.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel11.setMinimumSize(new java.awt.Dimension(34, 14));
    jLabel11.setName("jLabel11"); // NOI18N
    jLabel11.setPreferredSize(new java.awt.Dimension(34, 14));
    /*jLabel11.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jLabel11MouseClicked(evt);
        }
    });*/

    // jLabel12.setText("jLabel12");
    jLabel12.setMaximumSize(new java.awt.Dimension(36, 16));
    jLabel12.setMinimumSize(new java.awt.Dimension(34, 14));
    jLabel12.setName("jLabel12"); // NOI18N
    jLabel12.setPreferredSize(new java.awt.Dimension(34, 14));

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                jLabel11,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jLabel3,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jLabel5,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addGap(45, 45, 45)
                                    .addGroup(
                                        jPanel2Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(
                                                jLabel6,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jLabel4,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jLabel12,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        jPanel2Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(
                                                jLabel7,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jLabel8,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jLabel9,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jLabel10,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap(26, Short.MAX_VALUE)));

    jPanel2Layout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {
          jLabel10, jLabel11, jLabel12, jLabel3, jLabel4, jLabel5, jLabel6, jLabel7, jLabel8,
          jLabel9
        });

    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel3,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                34,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jLabel4,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                34,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel5,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                34,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jLabel6,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                34,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addComponent(
                        jLabel7,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        34,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jLabel8,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        34,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jLabel9,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        34,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jLabel10,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        34,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel11,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                34,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jLabel12,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                34,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(229, Short.MAX_VALUE)));

    jPanel2Layout.linkSize(
        javax.swing.SwingConstants.VERTICAL,
        new java.awt.Component[] {jLabel3, jLabel4, jLabel5, jLabel6});

    jPanel2Layout.linkSize(
        javax.swing.SwingConstants.VERTICAL,
        new java.awt.Component[] {jLabel11, jLabel12, jLabel7, jLabel8});

    jPanel2Layout.linkSize(
        javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jLabel10, jLabel9});

    canvas1.setBackground(new java.awt.Color(51, 51, 255));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(
                        jPanel2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        149,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(19, 19, 19)
                    .addComponent(
                        canvas1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        586,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(453, 453, 453))
            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1207, Short.MAX_VALUE));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addComponent(
                        jLabel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        26,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, 586, Short.MAX_VALUE)
                            .addComponent(
                                canvas1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                586,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    jLabel2.setText("Robot:");

    jLabel13.setText("0 ");

    jLabel14.setText("Tape:");

    jLabel15.setText("");

    jMenu1.setMnemonic('F');
    jMenu1.setText("File");

    jMenuItem1.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_1, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem1.setText("Open Challenge");
    jMenu1.add(jMenuItem1);

    jMenuItem2.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_2, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem2.setText("Load Solution");
    jMenu1.add(jMenuItem2);

    jMenuItem3.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));
    jMenuItem3.setText("Quit");
    jMenu1.add(jMenuItem3);

    jMenuBar1.add(jMenu1);

    jMenu2.setMnemonic('G');
    jMenu2.setText("Game");

    jMenuItem4.setText("Go");
    jMenu2.add(jMenuItem4);

    jMenuItem5.setText("Pause");
    jMenu2.add(jMenuItem5);

    jMenuItem6.setText("Faster");
    jMenu2.add(jMenuItem6);

    jMenuBar1.add(jMenu2);

    jMenu3.setMnemonic('H');
    jMenu3.setText("Help");

    jMenuItem7.setMnemonic('H');
    jMenuItem7.setText("Help");
    jMenu3.add(jMenuItem7);

    jMenuBar1.add(jMenu3);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jLabel2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        42,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jLabel13,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        17,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jLabel14)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jLabel15,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        336,
                        javax.swing.GroupLayout.PREFERRED_SIZE))
            .addComponent(
                jPanel1,
                javax.swing.GroupLayout.PREFERRED_SIZE,
                758,
                javax.swing.GroupLayout.PREFERRED_SIZE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addComponent(
                        jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 629, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(jLabel13)
                            .addComponent(jLabel14)
                            .addComponent(jLabel15))
                    .addContainerGap()));

    layout.linkSize(
        javax.swing.SwingConstants.VERTICAL,
        new java.awt.Component[] {jLabel13, jLabel14, jLabel15, jLabel2});

    getAccessibleContext().setAccessibleName("myframe");

    pack();
  } // </editor-fold>//GEN-END:initComponents
コード例 #2
0
ファイル: Options.java プロジェクト: BlackPheonix/XChat
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jTabbedPane1 = new javax.swing.JTabbedPane();
    ProfileTab = new javax.swing.JPanel();
    pro_pic_label = new javax.swing.JLabel();
    name_text = new javax.swing.JTextField();
    name_label = new javax.swing.JLabel();
    ChooseImage = new javax.swing.JButton();
    pro_pic_display = new javax.swing.JPanel();
    jLabel2 = new javax.swing.JLabel();
    GeneralTab = new javax.swing.JPanel();
    Display_button = new javax.swing.JLabel();
    color_button = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    font_style_list = new javax.swing.JList();
    jScrollPane3 = new javax.swing.JScrollPane();
    font_size_list = new javax.swing.JList();
    jScrollPane4 = new javax.swing.JScrollPane();
    DisplayArea_text = new javax.swing.JTextArea();
    Font_size_label = new javax.swing.JLabel();
    Font_label = new javax.swing.JLabel();
    Font_Color_button = new javax.swing.JButton();
    ChatsTab = new javax.swing.JPanel();
    Backup_Button = new javax.swing.JLabel();
    Backup_textfield = new javax.swing.JTextField();
    backup_folder_button = new javax.swing.JButton();
    Backup_Chat_label = new javax.swing.JLabel();
    backup_chat_button = new javax.swing.JButton();
    NotificationsTab = new javax.swing.JPanel();
    Sound = new javax.swing.JCheckBox();
    jLabel1 = new javax.swing.JLabel();
    Download_Textfield = new javax.swing.JTextField();
    Download_button = new javax.swing.JButton();
    AboutTab = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jLabel5 = new javax.swing.JLabel();
    cancel_button = new javax.swing.JButton();
    Save_Exit = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    pro_pic_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    pro_pic_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    pro_pic_label.setText("Profile Picture");

    name_text.setText(xchat.my_name);
    name_text.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            name_textActionPerformed(evt);
          }
        });

    name_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    name_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    name_label.setText("Name");

    ChooseImage.setText("Choose Image");
    ChooseImage.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            ChooseImageMouseClicked(evt);
          }
        });
    ChooseImage.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            ChooseImageActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout pro_pic_displayLayout = new javax.swing.GroupLayout(pro_pic_display);
    pro_pic_display.setLayout(pro_pic_displayLayout);
    pro_pic_displayLayout.setHorizontalGroup(
        pro_pic_displayLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE));
    pro_pic_displayLayout.setVerticalGroup(
        pro_pic_displayLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jLabel2,
                javax.swing.GroupLayout.Alignment.TRAILING,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                100,
                Short.MAX_VALUE));

    javax.swing.GroupLayout ProfileTabLayout = new javax.swing.GroupLayout(ProfileTab);
    ProfileTab.setLayout(ProfileTabLayout);
    ProfileTabLayout.setHorizontalGroup(
        ProfileTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                ProfileTabLayout.createSequentialGroup()
                    .addGap(30, 30, 30)
                    .addGroup(
                        ProfileTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(
                                ProfileTabLayout.createSequentialGroup()
                                    .addComponent(
                                        pro_pic_label,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        121,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        pro_pic_display,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        ChooseImage,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        159,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                ProfileTabLayout.createSequentialGroup()
                                    .addComponent(
                                        name_label,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        84,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE)
                                    .addComponent(
                                        name_text,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        303,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(188, Short.MAX_VALUE)));
    ProfileTabLayout.setVerticalGroup(
        ProfileTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                ProfileTabLayout.createSequentialGroup()
                    .addGap(33, 33, 33)
                    .addGroup(
                        ProfileTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                name_label,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                33,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                name_text,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                33,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        ProfileTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                ChooseImage,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                34,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                pro_pic_display,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                pro_pic_label,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                33,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Profile", ProfileTab);

    Display_button.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    Display_button.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    Display_button.setText("Display");

    color_button.setText("Background Color");
    color_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            color_buttonActionPerformed(evt);
          }
        });

    font_style_list.setModel(
        new javax.swing.AbstractListModel() {
          String[] strings = {
            "Arial",
            "Bradley Hand ITC",
            "Castellar",
            "Chiller",
            "Comic Sans MS",
            "Courier New",
            "Lucida Calligraphy",
            "Papyrus",
            "Tahoma",
            "Times New Roman"
          };

          public int getSize() {
            return strings.length;
          }

          public Object getElementAt(int i) {
            return strings[i];
          }
        });
    font_style_list.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    font_style_list.setSelectedIndex(0);
    font_style_list.addListSelectionListener(
        new javax.swing.event.ListSelectionListener() {
          public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            font_style_listValueChanged(evt);
          }
        });
    jScrollPane2.setViewportView(font_style_list);
    font_style_list.setSelectedIndex(0);

    font_size_list.setModel(
        new javax.swing.AbstractListModel() {
          String[] strings = {"very small", "small", "medium", "huge", "vey huge"};

          public int getSize() {
            return strings.length;
          }

          public Object getElementAt(int i) {
            return strings[i];
          }
        });
    font_size_list.setSelectedIndex(1);
    font_size_list.addListSelectionListener(
        new javax.swing.event.ListSelectionListener() {
          public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            font_size_listValueChanged(evt);
          }
        });
    jScrollPane3.setViewportView(font_size_list);

    jScrollPane4.setHorizontalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    jScrollPane4.setVerticalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);

    DisplayArea_text.setEditable(false);
    DisplayArea_text.setColumns(20);
    DisplayArea_text.setRows(5);
    DisplayArea_text.setText("AaBbYyZz");
    DisplayArea_text.setAutoscrolls(false);
    DisplayArea_text.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    jScrollPane4.setViewportView(DisplayArea_text);

    Font_size_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    Font_size_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    Font_size_label.setText("Font size");

    Font_label.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    Font_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    Font_label.setText("Font ");

    Font_Color_button.setText("Font Color");
    Font_Color_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            Font_Color_buttonActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout GeneralTabLayout = new javax.swing.GroupLayout(GeneralTab);
    GeneralTab.setLayout(GeneralTabLayout);
    GeneralTabLayout.setHorizontalGroup(
        GeneralTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                GeneralTabLayout.createSequentialGroup()
                    .addGap(52, 52, 52)
                    .addGroup(
                        GeneralTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                color_button,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                147,
                                Short.MAX_VALUE)
                            .addComponent(
                                Display_button,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                133,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                Font_Color_button,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addGap(36, 36, 36)
                    .addGroup(
                        GeneralTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                GeneralTabLayout.createSequentialGroup()
                                    .addComponent(
                                        jScrollPane2,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        152,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(40, 40, 40)
                                    .addComponent(
                                        jScrollPane3,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        100,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                jScrollPane4,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                259,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(107, Short.MAX_VALUE))
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                GeneralTabLayout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(
                        Font_label,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        120,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(53, 53, 53)
                    .addComponent(
                        Font_size_label,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        120,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(97, 97, 97)));
    GeneralTabLayout.setVerticalGroup(
        GeneralTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                GeneralTabLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        GeneralTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                GeneralTabLayout.createSequentialGroup()
                                    .addComponent(
                                        Font_size_label,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        27,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(8, 8, 8)
                                    .addComponent(
                                        jScrollPane3,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        84,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                GeneralTabLayout.createSequentialGroup()
                                    .addComponent(
                                        Font_label,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        27,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        GeneralTabLayout.createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(
                                                jScrollPane2,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                84,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGroup(
                                                GeneralTabLayout.createSequentialGroup()
                                                    .addComponent(
                                                        color_button,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        36,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .UNRELATED)
                                                    .addComponent(
                                                        Font_Color_button,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        Short.MAX_VALUE)))))
                    .addGap(18, 18, 18)
                    .addGroup(
                        GeneralTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jScrollPane4,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                51,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                Display_button,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                40,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jTabbedPane1.addTab("General", GeneralTab);

    Backup_Button.setText("Backup Folder");

    Backup_textfield.setEditable(false);
    Backup_textfield.setText(xchat.path_save_chat);
    Backup_textfield.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            Backup_textfieldActionPerformed(evt);
          }
        });

    backup_folder_button.setText("Choose Folder");
    backup_folder_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            backup_folder_buttonActionPerformed(evt);
          }
        });

    Backup_Chat_label.setText("Backup Current Chat");

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

    javax.swing.GroupLayout ChatsTabLayout = new javax.swing.GroupLayout(ChatsTab);
    ChatsTab.setLayout(ChatsTabLayout);
    ChatsTabLayout.setHorizontalGroup(
        ChatsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                ChatsTabLayout.createSequentialGroup()
                    .addGap(57, 57, 57)
                    .addGroup(
                        ChatsTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                Backup_Chat_label,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                114,
                                Short.MAX_VALUE)
                            .addComponent(
                                Backup_Button,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        Backup_textfield,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        227,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(30, 30, 30)
                    .addComponent(
                        backup_folder_button,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        115,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(87, Short.MAX_VALUE))
            .addGroup(
                ChatsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                        ChatsTabLayout.createSequentialGroup()
                            .addGap(185, 185, 185)
                            .addComponent(
                                backup_chat_button,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                102,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap(347, Short.MAX_VALUE))));
    ChatsTabLayout.setVerticalGroup(
        ChatsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                ChatsTabLayout.createSequentialGroup()
                    .addGap(44, 44, 44)
                    .addGroup(
                        ChatsTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                Backup_Button,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                37,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                Backup_textfield,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                37,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                backup_folder_button,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                37,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
                    .addComponent(
                        Backup_Chat_label,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        37,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(59, 59, 59))
            .addGroup(
                ChatsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                        javax.swing.GroupLayout.Alignment.TRAILING,
                        ChatsTabLayout.createSequentialGroup()
                            .addContainerGap(128, Short.MAX_VALUE)
                            .addComponent(
                                backup_chat_button,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                37,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(56, 56, 56))));

    jTabbedPane1.addTab("Chats ", ChatsTab);

    Sound.setSelected(true);
    Sound.setText("Sound");
    Sound.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            SoundActionPerformed(evt);
          }
        });

    jLabel1.setText("Download Folder");

    Download_Textfield.setEditable(false);
    Download_Textfield.setText(xchat.path_save_download);

    Download_button.setText("Choose Folder");
    Download_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            Download_buttonActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout NotificationsTabLayout = new javax.swing.GroupLayout(NotificationsTab);
    NotificationsTab.setLayout(NotificationsTabLayout);
    NotificationsTabLayout.setHorizontalGroup(
        NotificationsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                NotificationsTabLayout.createSequentialGroup()
                    .addGap(36, 36, 36)
                    .addGroup(
                        NotificationsTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                NotificationsTabLayout.createSequentialGroup()
                                    .addComponent(
                                        jLabel1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        126,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        Download_Textfield,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        291,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        Download_button,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        123,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                Sound,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                146,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(36, Short.MAX_VALUE)));
    NotificationsTabLayout.setVerticalGroup(
        NotificationsTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                NotificationsTabLayout.createSequentialGroup()
                    .addGap(35, 35, 35)
                    .addComponent(
                        Sound,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        39,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        NotificationsTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                Download_button,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                34,
                                Short.MAX_VALUE)
                            .addComponent(
                                jLabel1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                Download_Textfield,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                34,
                                Short.MAX_VALUE))
                    .addContainerGap(108, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Sounds & Download", NotificationsTab);

    AboutTab.setAutoscrolls(true);
    AboutTab.setEnabled(false);

    jScrollPane1.setHorizontalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
    jScrollPane1.setVerticalScrollBarPolicy(
        javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);
    jScrollPane1.setOpaque(false);

    jTextArea1.setEditable(false);
    jTextArea1.setBackground(new java.awt.Color(240, 240, 240));
    jTextArea1.setColumns(20);
    jTextArea1.setFont(new java.awt.Font("Times New Roman", 0, 14)); // NOI18N
    jTextArea1.setLineWrap(true);
    jTextArea1.setRows(5);
    jTextArea1.setText(
        "XChat is based on software from JAVA, which has been doubled licensed under the Narendari Modi Development and Distribution (NMDD) and the Barack Obama License (BOL) version 9.9.9.9.9.9... with Rahul Gandhi exception. For more information, please visit http://www.google.co.in/ ");
    jTextArea1.setWrapStyleWord(true);
    jTextArea1.setBorder(null);
    jTextArea1.setOpaque(false);
    jScrollPane1.setViewportView(jTextArea1);

    jLabel3.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/xchat/Barack Obama.jpg"))); // NOI18N

    jLabel4.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/xchat/X (2).jpg"))); // NOI18N

    jLabel5.setIcon(
        new javax.swing.ImageIcon(
            getClass().getResource("/xchat/Narendra-Modi-In-Brown-Coat.jpg"))); // NOI18N

    javax.swing.GroupLayout AboutTabLayout = new javax.swing.GroupLayout(AboutTab);
    AboutTab.setLayout(AboutTabLayout);
    AboutTabLayout.setHorizontalGroup(
        AboutTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                AboutTabLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        AboutTabLayout.createParallelGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jScrollPane1)
                            .addGroup(
                                AboutTabLayout.createSequentialGroup()
                                    .addComponent(
                                        jLabel5,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        180,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(50, 50, 50)
                                    .addComponent(
                                        jLabel4,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        150,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        54,
                                        Short.MAX_VALUE)
                                    .addComponent(
                                        jLabel3,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        180,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap()));

    AboutTabLayout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jLabel3, jLabel5});

    AboutTabLayout.setVerticalGroup(
        AboutTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                AboutTabLayout.createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        AboutTabLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(
                                jLabel3,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                90,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jLabel5,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                90,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jLabel4,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                90,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addComponent(
                        jScrollPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        80,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    AboutTabLayout.linkSize(
        javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {jLabel3, jLabel5});

    jTabbedPane1.addTab("About", AboutTab);

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

    Save_Exit.setText("Save and Exit");
    Save_Exit.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            Save_ExitActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                layout
                                    .createSequentialGroup()
                                    .addGap(0, 0, Short.MAX_VALUE)
                                    .addComponent(
                                        Save_Exit,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        114,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(
                                        cancel_button,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        99,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jTabbedPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        230,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                cancel_button,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                35,
                                Short.MAX_VALUE)
                            .addComponent(
                                Save_Exit,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addContainerGap()));

    pack();
  } // </editor-fold>//GEN-END:initComponents
コード例 #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.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    mainPanel = new javax.swing.JPanel();
    pnButton = new javax.swing.JPanel();
    btnVertex = new javax.swing.JButton();
    btnEdge = new javax.swing.JButton();
    btnStart = new javax.swing.JButton();
    btnEnd = new javax.swing.JButton();
    btnStep = new javax.swing.JButton();
    btnSolve = new javax.swing.JButton();
    btnClear = new javax.swing.JButton();
    /*
    pnGraph = new javax.swing.JPanel();
    */ this.pnGraph = new jGraphPanel();
    jTextStatus = new javax.swing.JTextField();
    jRandomCheck = new javax.swing.JCheckBox();
    /*
    pnHeap = new javax.swing.JPanel();
    */ this.pnHeap = new jHeapPanel();
    jTextHeap = new javax.swing.JLabel();
    pnSolution = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jSolution = new javax.swing.JTextArea();
    menuBar = new javax.swing.JMenuBar();
    javax.swing.JMenu fileMenu = new javax.swing.JMenu();
    openMenuItem = new javax.swing.JMenuItem();
    saveMenuItem = new javax.swing.JMenuItem();
    jSeparator = new javax.swing.JPopupMenu.Separator();
    javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
    javax.swing.JMenu helpMenu = new javax.swing.JMenu();
    javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
    jOpenFileChooser = new javax.swing.JFileChooser();
    jSaveFileChooser = new javax.swing.JFileChooser();

    mainPanel.setMinimumSize(new java.awt.Dimension(715, 600));
    mainPanel.setName("mainPanel"); // NOI18N
    mainPanel.setPreferredSize(new java.awt.Dimension(715, 600));

    pnButton.setMinimumSize(new java.awt.Dimension(90, 300));
    pnButton.setName("pnButton"); // NOI18N
    pnButton.setPreferredSize(new java.awt.Dimension(90, 300));

    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance(dijkstra.DijkstraApp.class)
            .getContext()
            .getResourceMap(DijkstraView.class);
    btnVertex.setText(resourceMap.getString("btnVertex.text")); // NOI18N
    btnVertex.setToolTipText(resourceMap.getString("btnVertex.toolTipText")); // NOI18N
    btnVertex.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnVertex.setMinimumSize(new java.awt.Dimension(70, 30));
    btnVertex.setName("btnVertex"); // NOI18N
    btnVertex.setPreferredSize(new java.awt.Dimension(70, 30));
    btnVertex.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            btnVertexMouseClicked(evt);
          }
        });

    btnEdge.setText(resourceMap.getString("btnEdge.text")); // NOI18N
    btnEdge.setToolTipText(resourceMap.getString("btnEdge.toolTipText")); // NOI18N
    btnEdge.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnEdge.setMinimumSize(new java.awt.Dimension(70, 30));
    btnEdge.setName("btnEdge"); // NOI18N
    btnEdge.setPreferredSize(new java.awt.Dimension(70, 30));
    btnEdge.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            btnEdgeMouseClicked(evt);
          }
        });

    btnStart.setText(resourceMap.getString("btnStart.text")); // NOI18N
    btnStart.setToolTipText(resourceMap.getString("btnStart.toolTipText")); // NOI18N
    btnStart.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnStart.setMinimumSize(new java.awt.Dimension(70, 30));
    btnStart.setName("btnStart"); // NOI18N
    btnStart.setPreferredSize(new java.awt.Dimension(70, 30));
    btnStart.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            btnStartMouseClicked(evt);
          }
        });

    btnEnd.setText(resourceMap.getString("btnEnd.text")); // NOI18N
    btnEnd.setToolTipText(resourceMap.getString("btnEnd.toolTipText")); // NOI18N
    btnEnd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnEnd.setMinimumSize(new java.awt.Dimension(70, 30));
    btnEnd.setName("btnEnd"); // NOI18N
    btnEnd.setPreferredSize(new java.awt.Dimension(70, 30));
    btnEnd.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            btnEndMouseClicked(evt);
          }
        });

    btnStep.setText(resourceMap.getString("btnStep.text")); // NOI18N
    btnStep.setToolTipText(resourceMap.getString("btnStep.toolTipText")); // NOI18N
    btnStep.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnStep.setMinimumSize(new java.awt.Dimension(70, 30));
    btnStep.setName("btnStep"); // NOI18N
    btnStep.setPreferredSize(new java.awt.Dimension(70, 30));
    btnStep.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            btnStepMouseClicked(evt);
          }
        });

    btnSolve.setText(resourceMap.getString("btnSolve.text")); // NOI18N
    btnSolve.setToolTipText(resourceMap.getString("btnSolve.toolTipText")); // NOI18N
    btnSolve.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnSolve.setMinimumSize(new java.awt.Dimension(70, 30));
    btnSolve.setName("btnSolve"); // NOI18N
    btnSolve.setPreferredSize(new java.awt.Dimension(70, 30));
    btnSolve.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            btnSolveMouseClicked(evt);
          }
        });

    btnClear.setText(resourceMap.getString("btnClear.text")); // NOI18N
    btnClear.setToolTipText(resourceMap.getString("btnClear.toolTipText")); // NOI18N
    btnClear.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
    btnClear.setMaximumSize(new java.awt.Dimension(50, 50));
    btnClear.setMinimumSize(new java.awt.Dimension(70, 30));
    btnClear.setName("btnClear"); // NOI18N
    btnClear.setPreferredSize(new java.awt.Dimension(70, 30));
    btnClear.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            btnClearMouseClicked(evt);
          }
        });

    javax.swing.GroupLayout pnButtonLayout = new javax.swing.GroupLayout(pnButton);
    pnButton.setLayout(pnButtonLayout);
    pnButtonLayout.setHorizontalGroup(
        pnButtonLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                pnButtonLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        pnButtonLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                pnButtonLayout
                                    .createParallelGroup(
                                        javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(
                                        btnVertex,
                                        javax.swing.GroupLayout.Alignment.CENTER,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        70,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        btnEdge,
                                        javax.swing.GroupLayout.Alignment.CENTER,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        70,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        btnStart,
                                        javax.swing.GroupLayout.Alignment.CENTER,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        70,
                                        Short.MAX_VALUE)
                                    .addComponent(
                                        btnEnd,
                                        javax.swing.GroupLayout.Alignment.CENTER,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        70,
                                        Short.MAX_VALUE)
                                    .addComponent(
                                        btnSolve,
                                        javax.swing.GroupLayout.Alignment.CENTER,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        70,
                                        Short.MAX_VALUE)
                                    .addComponent(
                                        btnStep,
                                        javax.swing.GroupLayout.Alignment.CENTER,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        70,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                btnClear,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                70,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pnButtonLayout.linkSize(
        javax.swing.SwingConstants.HORIZONTAL,
        new java.awt.Component[] {
          btnClear, btnEdge, btnEnd, btnSolve, btnStart, btnStep, btnVertex
        });

    pnButtonLayout.setVerticalGroup(
        pnButtonLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                pnButtonLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        btnVertex, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        btnEdge, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        btnStart, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(btnEnd, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        btnSolve, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        btnStep, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        btnClear, javax.swing.GroupLayout.DEFAULT_SIZE, 30, Short.MAX_VALUE)
                    .addGap(13, 13, 13)));

    btnVertex
        .getAccessibleContext()
        .setAccessibleDescription(
            resourceMap.getString("btnNode.AccessibleContext.accessibleDescription")); // NOI18N

    pnGraph.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            null,
            resourceMap.getString("pnGraph.border.title"),
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            resourceMap.getFont("pnGraph.border.titleFont"))); // NOI18N
    pnGraph.setToolTipText(resourceMap.getString("pnGraph.toolTipText")); // NOI18N
    pnGraph.setFont(resourceMap.getFont("pnGraph.font")); // NOI18N
    pnGraph.setMinimumSize(new java.awt.Dimension(600, 300));
    pnGraph.setName("pnGraph"); // NOI18N
    pnGraph.setPreferredSize(new java.awt.Dimension(600, 300));
    pnGraph.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseReleased(java.awt.event.MouseEvent evt) {
            pnGraphMouseReleased(evt);
          }
        });
    pnGraph.addMouseMotionListener(
        new java.awt.event.MouseMotionAdapter() {
          public void mouseMoved(java.awt.event.MouseEvent evt) {
            pnGraphMouseMoved(evt);
          }
        });

    jTextStatus.setEditable(false);
    jTextStatus.setFont(resourceMap.getFont("jTextStatus.font")); // NOI18N
    jTextStatus.setHorizontalAlignment(javax.swing.JTextField.RIGHT);
    jTextStatus.setText(resourceMap.getString("jTextStatus.text")); // NOI18N
    jTextStatus.setAutoscrolls(false);
    jTextStatus.setBorder(null);
    jTextStatus.setName("jTextStatus"); // NOI18N

    jRandomCheck.setFont(resourceMap.getFont("jRandomCheck.font")); // NOI18N
    jRandomCheck.setSelected(true);
    jRandomCheck.setText(resourceMap.getString("jRandomCheck.text")); // NOI18N
    jRandomCheck.setToolTipText(resourceMap.getString("jRandomCheck.toolTipText")); // NOI18N
    jRandomCheck.setEnabled(false);
    jRandomCheck.setName("jRandomCheck"); // NOI18N

    javax.swing.GroupLayout pnGraphLayout = new javax.swing.GroupLayout(pnGraph);
    pnGraph.setLayout(pnGraphLayout);
    pnGraphLayout.setHorizontalGroup(
        pnGraphLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                pnGraphLayout
                    .createSequentialGroup()
                    .addContainerGap(327, Short.MAX_VALUE)
                    .addGroup(
                        pnGraphLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                pnGraphLayout
                                    .createSequentialGroup()
                                    .addComponent(jRandomCheck)
                                    .addContainerGap())
                            .addComponent(
                                jTextStatus,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                261,
                                javax.swing.GroupLayout.PREFERRED_SIZE))));
    pnGraphLayout.setVerticalGroup(
        pnGraphLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                pnGraphLayout
                    .createSequentialGroup()
                    .addComponent(
                        jTextStatus,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 225, Short.MAX_VALUE)
                    .addComponent(jRandomCheck)
                    .addContainerGap()));

    pnHeap.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            null,
            resourceMap.getString("pnHeap.border.title"),
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            resourceMap.getFont("pnHeap.border.titleFont"))); // NOI18N
    pnHeap.setToolTipText(resourceMap.getString("pnHeap.toolTipText")); // NOI18N
    pnHeap.setFont(resourceMap.getFont("pnHeap.font")); // NOI18N
    pnHeap.setMinimumSize(new java.awt.Dimension(400, 250));
    pnHeap.setName("pnHeap"); // NOI18N
    pnHeap.setPreferredSize(new java.awt.Dimension(400, 250));

    jTextHeap.setFont(resourceMap.getFont("jTextHeap.font")); // NOI18N
    jTextHeap.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jTextHeap.setText(resourceMap.getString("jTextHeap.text")); // NOI18N
    jTextHeap.setName("jTextHeap"); // NOI18N

    javax.swing.GroupLayout pnHeapLayout = new javax.swing.GroupLayout(pnHeap);
    pnHeap.setLayout(pnHeapLayout);
    pnHeapLayout.setHorizontalGroup(
        pnHeapLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                pnHeapLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jTextHeap, javax.swing.GroupLayout.DEFAULT_SIZE, 368, Short.MAX_VALUE)
                    .addContainerGap()));
    pnHeapLayout.setVerticalGroup(
        pnHeapLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                pnHeapLayout
                    .createSequentialGroup()
                    .addComponent(
                        jTextHeap,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        16,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(204, Short.MAX_VALUE)));

    jTextHeap
        .getAccessibleContext()
        .setAccessibleName(
            resourceMap.getString("jTextHeap.AccessibleContext.accessibleName")); // NOI18N

    pnSolution.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            null,
            resourceMap.getString("pnSolution.border.title"),
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            resourceMap.getFont("pnSolution.border.titleFont"))); // NOI18N
    pnSolution.setToolTipText(resourceMap.getString("pnSolution.toolTipText")); // NOI18N
    pnSolution.setMinimumSize(new java.awt.Dimension(290, 250));
    pnSolution.setName("pnSolution"); // NOI18N
    pnSolution.setPreferredSize(new java.awt.Dimension(290, 250));

    jScrollPane1.setName("jScrollPane1"); // NOI18N

    jSolution.setColumns(20);
    jSolution.setEditable(false);
    jSolution.setFont(resourceMap.getFont("jSolution.font")); // NOI18N
    jSolution.setLineWrap(true);
    jSolution.setRows(4);
    jSolution.setToolTipText(resourceMap.getString("jSolution.toolTipText")); // NOI18N
    jSolution.setWrapStyleWord(true);
    jSolution.setBorder(null);
    jSolution.setEnabled(false);
    jSolution.setFocusable(false);
    jSolution.setName("jSolution"); // NOI18N
    jScrollPane1.setViewportView(jSolution);

    javax.swing.GroupLayout pnSolutionLayout = new javax.swing.GroupLayout(pnSolution);
    pnSolution.setLayout(pnSolutionLayout);
    pnSolutionLayout.setHorizontalGroup(
        pnSolutionLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jScrollPane1,
                javax.swing.GroupLayout.Alignment.TRAILING,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                278,
                Short.MAX_VALUE));
    pnSolutionLayout.setVerticalGroup(
        pnSolutionLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE));

    javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
    mainPanel.setLayout(mainPanelLayout);
    mainPanelLayout.setHorizontalGroup(
        mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                mainPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                mainPanelLayout
                                    .createSequentialGroup()
                                    .addComponent(
                                        pnButton,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        pnGraph,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE))
                            .addGroup(
                                mainPanelLayout
                                    .createSequentialGroup()
                                    .addComponent(
                                        pnHeap,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        pnSolution,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(9, 9, 9)));
    mainPanelLayout.setVerticalGroup(
        mainPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                mainPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                pnButton,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                pnGraph,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        mainPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                pnHeap,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                pnSolution,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(15, 15, 15)));

    menuBar.setName("menuBar"); // NOI18N

    fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N
    fileMenu.setName("fileMenu"); // NOI18N

    openMenuItem.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
    openMenuItem.setText(resourceMap.getString("openMenuItem.text")); // NOI18N
    openMenuItem.setToolTipText(resourceMap.getString("openMenuItem.toolTipText")); // NOI18N
    openMenuItem.setActionCommand(resourceMap.getString("openMenuItem.actionCommand")); // NOI18N
    openMenuItem.setName("openMenuItem"); // NOI18N
    openMenuItem.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            openMenuItemActionPerformed(evt);
          }
        });
    fileMenu.add(openMenuItem);

    saveMenuItem.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
    saveMenuItem.setText(resourceMap.getString("saveMenuItem.text")); // NOI18N
    saveMenuItem.setToolTipText(resourceMap.getString("saveMenuItem.toolTipText")); // NOI18N
    saveMenuItem.setName("saveMenuItem"); // NOI18N
    saveMenuItem.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            saveMenuItemActionPerformed(evt);
          }
        });
    fileMenu.add(saveMenuItem);

    jSeparator.setName("jSeparator"); // NOI18N
    fileMenu.add(jSeparator);

    javax.swing.ActionMap actionMap =
        org.jdesktop.application.Application.getInstance(dijkstra.DijkstraApp.class)
            .getContext()
            .getActionMap(DijkstraView.class, this);
    exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
    exitMenuItem.setName("exitMenuItem"); // NOI18N
    fileMenu.add(exitMenuItem);

    menuBar.add(fileMenu);

    helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
    helpMenu.setName("helpMenu"); // NOI18N

    aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
    aboutMenuItem.setName("aboutMenuItem"); // NOI18N
    helpMenu.add(aboutMenuItem);

    menuBar.add(helpMenu);

    jOpenFileChooser.setFileFilter(new AppFilter());
    jOpenFileChooser.setName("jOpenFileChooser"); // NOI18N

    jSaveFileChooser.setDialogType(javax.swing.JFileChooser.SAVE_DIALOG);
    jSaveFileChooser.setFileFilter(new AppFilter());
    jSaveFileChooser.setName("jSaveFileChooser"); // NOI18N

    setComponent(mainPanel);
    setMenuBar(menuBar);
  } // </editor-fold>//GEN-END:initComponents