Пример #1
0
  private void initComponents() {

    setBackground(new java.awt.Color(0, 0, 0));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE));
  }
Пример #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.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    rubric_panel = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    rubric_table = new javax.swing.JTable();
    max_grade_field = new javax.swing.JTextField();
    grade_field = new javax.swing.JTextField();
    slash_label = new javax.swing.JLabel();
    total_label = new javax.swing.JLabel();
    id_label = new javax.swing.JLabel();
    student_id_label = new javax.swing.JLabel();
    name_label = new javax.swing.JLabel();
    student_name_label = new javax.swing.JLabel();
    submitted_panel = new javax.swing.JPanel();
    jScrollPane4 = new javax.swing.JScrollPane();
    submission_text_area = new javax.swing.JTextArea();
    solution_panel = new javax.swing.JPanel();
    jScrollPane5 = new javax.swing.JScrollPane();
    solution_text_area = new javax.swing.JTextArea();
    test_suite_button = new javax.swing.JButton();
    save_button = new javax.swing.JButton();
    next_button = new javax.swing.JButton();

    rubric_panel.setBorder(javax.swing.BorderFactory.createTitledBorder("Rubric"));
    rubric_panel.setMinimumSize(new java.awt.Dimension(400, 500));
    rubric_panel.setPreferredSize(new java.awt.Dimension(400, 500));

    rubric_table.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {{null, null, null}},
            new String[] {"Description", "Grade", "Max Grade"}) {
          Class[] types =
              new Class[] {
                java.lang.String.class, java.lang.Integer.class, java.lang.Integer.class
              };
          boolean[] canEdit = new boolean[] {false, true, false};

          public Class getColumnClass(int columnIndex) {
            return types[columnIndex];
          }

          public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
          }
        });
    rubric_table.getTableHeader().setReorderingAllowed(false);
    jScrollPane1.setViewportView(rubric_table);
    if (rubric_table.getColumnModel().getColumnCount() > 0) {
      rubric_table.getColumnModel().getColumn(1).setResizable(false);
      rubric_table.getColumnModel().getColumn(1).setPreferredWidth(8);
      rubric_table.getColumnModel().getColumn(2).setResizable(false);
      rubric_table.getColumnModel().getColumn(2).setPreferredWidth(10);
    }

    max_grade_field.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    max_grade_field.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    max_grade_field.setText("Max");

    grade_field.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    grade_field.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    grade_field.setText("Grade");

    slash_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    slash_label.setText("/");

    total_label.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
    total_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    total_label.setText("Total:");

    id_label.setText("...");

    student_id_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    student_id_label.setText("Student ID:");

    name_label.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    name_label.setText("Name:");

    student_name_label.setText("...");

    javax.swing.GroupLayout rubric_panelLayout = new javax.swing.GroupLayout(rubric_panel);
    rubric_panel.setLayout(rubric_panelLayout);
    rubric_panelLayout.setHorizontalGroup(
        rubric_panelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE)
            .addGroup(
                rubric_panelLayout
                    .createSequentialGroup()
                    .addComponent(
                        total_label,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        grade_field,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        101,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        slash_label,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        19,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        max_grade_field,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        101,
                        javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(
                rubric_panelLayout
                    .createSequentialGroup()
                    .addComponent(
                        name_label,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        99,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        student_name_label,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE))
            .addGroup(
                rubric_panelLayout
                    .createSequentialGroup()
                    .addComponent(
                        student_id_label,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        99,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        id_label,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)));
    rubric_panelLayout.setVerticalGroup(
        rubric_panelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                rubric_panelLayout
                    .createSequentialGroup()
                    .addGroup(
                        rubric_panelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                student_id_label,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(id_label))
                    .addGap(9, 9, 9)
                    .addGroup(
                        rubric_panelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(
                                name_label,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(student_name_label))
                    .addGap(5, 5, 5)
                    .addComponent(
                        jScrollPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        418,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        rubric_panelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                max_grade_field,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                47,
                                Short.MAX_VALUE)
                            .addComponent(
                                slash_label,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(grade_field, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                total_label,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))));

    submitted_panel.setBorder(javax.swing.BorderFactory.createTitledBorder("Submission"));
    submitted_panel.setMinimumSize(new java.awt.Dimension(400, 500));
    submitted_panel.setPreferredSize(new java.awt.Dimension(400, 500));

    submission_text_area.setColumns(20);
    submission_text_area.setRows(5);
    jScrollPane4.setViewportView(submission_text_area);

    javax.swing.GroupLayout submitted_panelLayout = new javax.swing.GroupLayout(submitted_panel);
    submitted_panel.setLayout(submitted_panelLayout);
    submitted_panelLayout.setHorizontalGroup(
        submitted_panelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE));
    submitted_panelLayout.setVerticalGroup(
        submitted_panelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 518, Short.MAX_VALUE));

    solution_panel.setBorder(javax.swing.BorderFactory.createTitledBorder("Solution"));
    solution_panel.setMinimumSize(new java.awt.Dimension(400, 500));
    solution_panel.setPreferredSize(new java.awt.Dimension(400, 500));

    solution_text_area.setEditable(false);
    solution_text_area.setColumns(20);
    solution_text_area.setRows(5);
    jScrollPane5.setViewportView(solution_text_area);

    javax.swing.GroupLayout solution_panelLayout = new javax.swing.GroupLayout(solution_panel);
    solution_panel.setLayout(solution_panelLayout);
    solution_panelLayout.setHorizontalGroup(
        solution_panelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 388, Short.MAX_VALUE));
    solution_panelLayout.setVerticalGroup(
        solution_panelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane5));

    test_suite_button.setText("Test Suite");
    test_suite_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            test_suite_buttonActionPerformed(evt);
          }
        });

    save_button.setText("Save");
    save_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            save_buttonActionPerformed(evt);
          }
        });

    next_button.setText("Next");
    next_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            next_buttonActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        save_button,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        145,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(67, 67, 67)
                                    .addComponent(
                                        next_button,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        176,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(
                                rubric_panel,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        submitted_panel,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        solution_panel,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE)
                                    .addComponent(
                                        test_suite_button,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        183,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap()))));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                submitted_panel,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                543,
                                Short.MAX_VALUE)
                            .addComponent(
                                solution_panel,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                543,
                                Short.MAX_VALUE)
                            .addComponent(
                                rubric_panel,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                543,
                                Short.MAX_VALUE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                layout
                                    .createParallelGroup(
                                        javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(
                                        next_button,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        49,
                                        Short.MAX_VALUE)
                                    .addComponent(
                                        save_button,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        Short.MAX_VALUE))
                            .addComponent(
                                test_suite_button,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                56,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
  } // </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() {

    jFrame1 = new javax.swing.JFrame();
    jFileChooser1 = new javax.swing.JFileChooser();
    jLabel1 = new javax.swing.JLabel();
    messOut_scroll = new javax.swing.JScrollPane();
    messOut = new javax.swing.JEditorPane();
    jPanel1 = new javax.swing.JPanel();
    ipLabel = new javax.swing.JLabel();
    portLabel = new javax.swing.JLabel();
    portBox = new javax.swing.JTextField();
    versLabel = new javax.swing.JLabel();
    versionBox = new javax.swing.JTextField();
    connButton = new javax.swing.JButton();
    openInstaller = new javax.swing.JButton();
    ipBox = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();

    jFrame1.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    jFrame1.setTitle("Change YS install dir");
    jFrame1.setAlwaysOnTop(true);

    jFileChooser1.setCurrentDirectory(new java.io.File("C:\\"));
    jFileChooser1.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);
    jFileChooser1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jFileChooser1ActionPerformed(evt);
          }
        });

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 11));
    jLabel1.setText("Select the directory YSFlight is installed in");

    javax.swing.GroupLayout jFrame1Layout = new javax.swing.GroupLayout(jFrame1.getContentPane());
    jFrame1.getContentPane().setLayout(jFrame1Layout);
    jFrame1Layout.setHorizontalGroup(
        jFrame1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jFrame1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1)
                    .addContainerGap(346, Short.MAX_VALUE))
            .addComponent(
                jFileChooser1, javax.swing.GroupLayout.DEFAULT_SIZE, 592, Short.MAX_VALUE));
    jFrame1Layout.setVerticalGroup(
        jFrame1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jFrame1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jFileChooser1,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        410,
                        Short.MAX_VALUE)));

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("AddonSearch");

    messOut.setContentType("text/html");
    messOut.setEditable(false);
    messOut.setText("<html>\r<body>\r</body>\r</html>\r\n");
    messOut_scroll.setViewportView(messOut);

    ipLabel.setText("IP");

    portLabel.setText("Port");

    portBox.setText("7915");

    versLabel.setText("Version");

    versionBox.setText("20110207");

    connButton.setFont(new java.awt.Font("Tahoma", 1, 18));
    connButton.setText("Connect!");
    connButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            connButtonActionPerformed(evt);
          }
        });

    openInstaller.setFont(new java.awt.Font("Tahoma", 0, 18));
    openInstaller.setText("Open addon installer");
    openInstaller.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            openInstallerActionPerformed(evt);
          }
        });

    ipBox.setEditable(true);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(ipLabel)
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        ipBox,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        137,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addComponent(portLabel)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        portBox,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(versLabel)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        versionBox,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)
                    .addComponent(
                        connButton,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        147,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(64, 64, 64)
                    .addComponent(openInstaller)
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ipLabel)
                            .addComponent(
                                ipBox,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(portLabel)
                            .addComponent(versLabel)
                            .addComponent(
                                versionBox,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                portBox,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap())
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                connButton,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                openInstaller,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addGap(66, 66, 66)));

    jLabel2.setText("made by erict15 for YSFHQ.com");

    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)
                            .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(
                                                messOut_scroll,
                                                javax.swing.GroupLayout.Alignment.LEADING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                599,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                jPanel1,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE))
                                    .addContainerGap()))));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jPanel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        53,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        messOut_scroll, javax.swing.GroupLayout.DEFAULT_SIZE, 210, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel2)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
  /**
   * 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
  /**
   * 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();
    jLabel2 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jTextField2 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setMinimumSize(new java.awt.Dimension(536, 545));
    getContentPane().setLayout(null);

    jPanel1.setBackground(new java.awt.Color(204, 204, 204));
    jPanel1.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            null,
            "Login",
            javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION,
            javax.swing.border.TitledBorder.DEFAULT_POSITION,
            new java.awt.Font("Maiandra GD", 1, 14),
            new java.awt.Color(0, 0, 0))); // NOI18N

    jLabel2.setFont(new java.awt.Font("Verdana", 1, 13));
    jLabel2.setText("Enter Id");

    jLabel3.setFont(new java.awt.Font("Verdana", 1, 13));
    jLabel3.setText("Enter Name");

    jTextField1.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N

    jTextField2.setFont(new java.awt.Font("Verdana", 1, 12)); // NOI18N

    jButton1.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/dcloud/img/verify.png"))); // NOI18N
    jButton1.setBorderPainted(false);
    jButton1.setContentAreaFilled(false);
    jButton1.setFocusable(false);
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    jButton2.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/dcloud/img/acc.png"))); // NOI18N
    jButton2.setBorderPainted(false);
    jButton2.setContentAreaFilled(false);
    jButton2.setFocusable(false);
    jButton2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jLabel2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                76,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3)
                            .addComponent(
                                jButton1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                110,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addGap(28, 28, 28)
                                    .addGroup(
                                        jPanel1Layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(
                                                jTextField2,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                153,
                                                Short.MAX_VALUE)
                                            .addComponent(jTextField1)))
                            .addGroup(
                                jPanel1Layout
                                    .createSequentialGroup()
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        jButton2,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        143,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(23, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addGap(61, 61, 61)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jLabel2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                17,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jTextField1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                28,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(51, 51, 51)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel3)
                            .addComponent(
                                jTextField2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                31,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 35, Short.MAX_VALUE)
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                jButton1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                41,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jButton2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                53,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(37, 37, 37)));

    getContentPane().add(jPanel1);
    jPanel1.setBounds(110, 130, 340, 330);

    jLabel1.setIcon(
        new javax.swing.ImageIcon(getClass().getResource("/dcloud/img/login1.png"))); // NOI18N
    getContentPane().add(jLabel1);
    jLabel1.setBounds(0, 0, 540, 540);

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #6
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() {

    panel = new javax.swing.JPanel();
    progressBar = new javax.swing.JProgressBar();
    scrollPane = new javax.swing.JScrollPane();
    textArea = new javax.swing.JTextArea();
    jTabbedPane1 = new javax.swing.JTabbedPane();
    jmdictPanel = new javax.swing.JPanel();
    outputLabel = new javax.swing.JLabel();
    langComboBox = new javax.swing.JComboBox();
    languageLabel = new javax.swing.JLabel();
    label = new javax.swing.JLabel();
    outputComboBox = new javax.swing.JComboBox();
    warodaiPanel = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("JMDict to DSL");

    panel.setPreferredSize(new java.awt.Dimension(600, 400));

    textArea.setEditable(false);
    textArea.setColumns(20);
    textArea.setRows(5);
    scrollPane.setViewportView(textArea);

    outputLabel.setText("Output:");

    langComboBox.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"English", "French", "German", "Russian"}));

    languageLabel.setText("Language:");

    label.setText("Drop the file \"JMDict\" or \"JMDict.gz\" here.");

    outputComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] {"DSL", "EDICT"}));

    javax.swing.GroupLayout jmdictPanelLayout = new javax.swing.GroupLayout(jmdictPanel);
    jmdictPanel.setLayout(jmdictPanelLayout);
    jmdictPanelLayout.setHorizontalGroup(
        jmdictPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
            .addGroup(
                jmdictPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                        jmdictPanelLayout
                            .createSequentialGroup()
                            .addContainerGap()
                            .addGroup(
                                jmdictPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(label)
                                    .addGroup(
                                        jmdictPanelLayout
                                            .createSequentialGroup()
                                            .addGroup(
                                                jmdictPanelLayout
                                                    .createParallelGroup(
                                                        javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(languageLabel)
                                                    .addComponent(outputLabel))
                                            .addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement
                                                    .UNRELATED)
                                            .addGroup(
                                                jmdictPanelLayout
                                                    .createParallelGroup(
                                                        javax.swing.GroupLayout.Alignment.LEADING,
                                                        false)
                                                    .addComponent(
                                                        langComboBox,
                                                        0,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        Short.MAX_VALUE)
                                                    .addComponent(
                                                        outputComboBox,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        97,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))))
                            .addContainerGap(
                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))));
    jmdictPanelLayout.setVerticalGroup(
        jmdictPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 106, Short.MAX_VALUE)
            .addGroup(
                jmdictPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                        jmdictPanelLayout
                            .createSequentialGroup()
                            .addGap(4, 4, 4)
                            .addComponent(label)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(
                                jmdictPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(languageLabel)
                                    .addComponent(
                                        langComboBox,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGap(26, 26, 26)
                            .addGroup(
                                jmdictPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(
                                        outputComboBox,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(outputLabel))
                            .addContainerGap(
                                javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))));

    jTabbedPane1.addTab("JMDict", jmdictPanel);

    jLabel1.setText("Drop file \"ewarodai.txt\" here.");

    javax.swing.GroupLayout warodaiPanelLayout = new javax.swing.GroupLayout(warodaiPanel);
    warodaiPanel.setLayout(warodaiPanelLayout);
    warodaiPanelLayout.setHorizontalGroup(
        warodaiPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                warodaiPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1)
                    .addContainerGap(423, Short.MAX_VALUE)));
    warodaiPanelLayout.setVerticalGroup(
        warodaiPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                warodaiPanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabel1)
                    .addContainerGap(81, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Warodai", warodaiPanel);

    jTabbedPane1.setSelectedIndex(1);

    javax.swing.GroupLayout panelLayout = new javax.swing.GroupLayout(panel);
    panel.setLayout(panelLayout);
    panelLayout.setHorizontalGroup(
        panelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        panelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(scrollPane)
                            .addComponent(
                                progressBar,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(jTabbedPane1))
                    .addContainerGap()));
    panelLayout.setVerticalGroup(
        panelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                panelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jTabbedPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        scrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 213, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        progressBar,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                panel,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                panel,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #7
0
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    texto_nick = new javax.swing.JLabel();
    texto_contrasenia = new javax.swing.JLabel();
    entradaNick = new javax.swing.JTextField();
    entradaContrasenia = new javax.swing.JPasswordField();
    botonAceptar = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    texto_nick.setText("Nick");
    texto_nick.setToolTipText("Nick");

    texto_contrasenia.setText("Contrasenia:");
    texto_contrasenia.setToolTipText("Contrasenia");

    entradaNick.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            entradaNickActionPerformed(evt);
          }
        });

    entradaContrasenia.setToolTipText("EntradaContrasenia");

    botonAceptar.setBackground(new java.awt.Color(153, 0, 153));
    botonAceptar.setForeground(new java.awt.Color(255, 0, 0));
    botonAceptar.setText("ACEPTAR");
    botonAceptar.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            botonAceptarMouseClicked(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()
                    .addGap(23, 23, 23)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(texto_contrasenia)
                            .addComponent(texto_nick)
                            .addComponent(
                                entradaContrasenia,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                74,
                                Short.MAX_VALUE)
                            .addComponent(entradaNick))
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 145, Short.MAX_VALUE)
                    .addComponent(
                        botonAceptar,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        94,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(64, 64, 64)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(19, 19, 19)
                                    .addComponent(texto_nick)
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        entradaNick,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(23, 23, 23)
                                    .addComponent(texto_contrasenia)
                                    .addGap(26, 26, 26)
                                    .addComponent(
                                        entradaContrasenia,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(102, 102, 102)
                                    .addComponent(
                                        botonAceptar,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        71,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(127, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #8
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() {

    charPercentagePanel = new javax.swing.JPanel();
    displayLabel = new javax.swing.JLabel();
    jScrollPane1 = new javax.swing.JScrollPane();
    charPercentageTable = new javax.swing.JTable();
    displaySpinner = new javax.swing.JSpinner();
    analyzeCharPercentageButton = new javax.swing.JButton();
    menuBar = new javax.swing.JMenuBar();
    fileMenu = new javax.swing.JMenu();
    loadFileMenuItem = new javax.swing.JMenuItem();
    extrasMenu = new javax.swing.JMenu();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(i18n.getString("StatisticalAnalysisFrame.title")); // NOI18N

    charPercentagePanel.setBorder(
        javax.swing.BorderFactory.createTitledBorder(
            i18n.getString("StatisticalAnalysisFrame.charPercentagePanel.border.title"))); // NOI18N

    displayLabel.setText(i18n.getString("StatisticalAnalysisFrame.displayLabel.text")); // NOI18N

    charPercentageTable.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {
              {null, null, null},
              {null, null, null},
              {null, null, null},
              {null, null, null},
              {null, null, null},
              {null, null, null},
              {null, null, null},
              {null, null, null},
              {null, null, null},
              {null, null, null}
            },
            new String[] {"Character", "Count", "Percentage"}) {
          boolean[] canEdit = new boolean[] {false, false, true};

          public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
          }
        });
    jScrollPane1.setViewportView(charPercentageTable);

    displaySpinner.setModel(new SpinnerNumberModel(10, 1, 1000, 1));
    displaySpinner.setToolTipText(
        i18n.getString("StatisticalAnalysisFrame.displaySpinner.toolTipText")); // NOI18N

    analyzeCharPercentageButton.setText(
        i18n.getString("StatisticalAnalysisFrame.analyzeCharPercentageButton.text")); // NOI18N
    analyzeCharPercentageButton.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            analyzeCharPercentageButtonMouseClicked(evt);
          }
        });

    javax.swing.GroupLayout charPercentagePanelLayout =
        new javax.swing.GroupLayout(charPercentagePanel);
    charPercentagePanel.setLayout(charPercentagePanelLayout);
    charPercentagePanelLayout.setHorizontalGroup(
        charPercentagePanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                charPercentagePanelLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        charPercentagePanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                analyzeCharPercentageButton,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                206,
                                Short.MAX_VALUE)
                            .addComponent(
                                jScrollPane1,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                206,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.LEADING,
                                charPercentagePanelLayout
                                    .createSequentialGroup()
                                    .addComponent(displayLabel)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        displaySpinner,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        144,
                                        Short.MAX_VALUE)))
                    .addContainerGap()));
    charPercentagePanelLayout.setVerticalGroup(
        charPercentagePanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                charPercentagePanelLayout
                    .createSequentialGroup()
                    .addComponent(
                        jScrollPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        188,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        charPercentagePanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(displayLabel)
                            .addComponent(
                                displaySpinner,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                    .addComponent(analyzeCharPercentageButton)
                    .addContainerGap()));

    fileMenu.setText(i18n.getString("StatisticalAnalysisFrame.fileMenu.text")); // NOI18N

    loadFileMenuItem.setAccelerator(
        javax.swing.KeyStroke.getKeyStroke(
            java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
    loadFileMenuItem.setText(
        i18n.getString("StatisticalAnalysisFrame.loadFileMenuItem.text")); // NOI18N
    loadFileMenuItem.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            loadFileMenuItemActionPerformed(evt);
          }
        });
    fileMenu.add(loadFileMenuItem);

    menuBar.add(fileMenu);

    extrasMenu.setText(i18n.getString("StatisticalAnalysisFrame.extrasMenu.text")); // NOI18N
    menuBar.add(extrasMenu);

    setJMenuBar(menuBar);

    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(
                        charPercentagePanel,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(273, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        charPercentagePanel,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(17, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #9
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() {

    jLabel4 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    ConnectKnowledgeBaseBtn = new javax.swing.JButton();
    SparqlBtn = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    SparqlTxtArea = new javax.swing.JTextArea();
    jLabel1 = new javax.swing.JLabel();
    jScrollPane3 = new javax.swing.JScrollPane();
    JessRuleArea = new javax.swing.JTextArea();
    JessTestBtn = new javax.swing.JButton();
    EvaluateJessRule = new javax.swing.JButton();
    JessStringTF = new javax.swing.JTextField();
    jTextField1 = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    jButton2 = new javax.swing.JButton();
    jTextField2 = new javax.swing.JTextField();
    jTextField4 = new javax.swing.JTextField();
    jPasswordField1 = new javax.swing.JPasswordField();
    jCheckBox1 = new javax.swing.JCheckBox();
    jLabel5 = new javax.swing.JLabel();
    DurationTF = new javax.swing.JTextField();
    jLabel6 = new javax.swing.JLabel();
    ProjectNameTF = new javax.swing.JTextField();
    BriefInfoBtn = new javax.swing.JButton();
    jScrollPane2 = new javax.swing.JScrollPane();
    LoggingAreaTA = new javax.swing.JTextArea();
    CountInstancesBtn = new javax.swing.JButton();
    ClassNameTF = new javax.swing.JTextField();
    QueriesCmb = new javax.swing.JComboBox();
    LoadQueriesBtn = new javax.swing.JButton();
    RunThisQueryBtn = new javax.swing.JButton();
    RunAllQueriesBtn = new javax.swing.JButton();
    ExitBtn = new javax.swing.JButton();
    SPARQL2JessBtn = new javax.swing.JButton();
    ClearQueriesBtn = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    org.jdesktop.application.ResourceMap resourceMap =
        org.jdesktop.application.Application.getInstance(
                placecommframework.PlaceCommFrameworkApp.class)
            .getContext()
            .getResourceMap(PBVCPlugin.class);
    setTitle(resourceMap.getString("Form.title")); // NOI18N
    setIconImage(null);
    setName("Form"); // NOI18N

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

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

    ConnectKnowledgeBaseBtn.setText(
        resourceMap.getString("ConnectKnowledgeBaseBtn.text")); // NOI18N
    ConnectKnowledgeBaseBtn.setName("ConnectKnowledgeBaseBtn"); // NOI18N
    ConnectKnowledgeBaseBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            ConnectKnowledgeBaseBtnMouseClicked(evt);
          }
        });

    SparqlBtn.setText(resourceMap.getString("SparqlBtn.text")); // NOI18N
    SparqlBtn.setName("SparqlBtn"); // NOI18N
    SparqlBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            SparqlBtnMouseClicked(evt);
          }
        });

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

    SparqlTxtArea.setColumns(20);
    SparqlTxtArea.setRows(5);
    SparqlTxtArea.setText(resourceMap.getString("SparqlTxtArea.text")); // NOI18N
    SparqlTxtArea.setName("SparqlTxtArea"); // NOI18N
    jScrollPane1.setViewportView(SparqlTxtArea);

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

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

    JessRuleArea.setColumns(20);
    JessRuleArea.setRows(5);
    JessRuleArea.setText(resourceMap.getString("JessRuleArea.text")); // NOI18N
    JessRuleArea.setName("JessRuleArea"); // NOI18N
    jScrollPane3.setViewportView(JessRuleArea);

    JessTestBtn.setText(resourceMap.getString("JessTestBtn.text")); // NOI18N
    JessTestBtn.setName("JessTestBtn"); // NOI18N
    JessTestBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            JessTestBtnMouseClicked(evt);
          }
        });

    EvaluateJessRule.setText(resourceMap.getString("EvaluateJessRule.text")); // NOI18N
    EvaluateJessRule.setName("EvaluateJessRule"); // NOI18N
    EvaluateJessRule.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            EvaluateJessRuleMouseClicked(evt);
          }
        });

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

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

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

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

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

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

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

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

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

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

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

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

    BriefInfoBtn.setText(resourceMap.getString("BriefInfoBtn.text")); // NOI18N
    BriefInfoBtn.setName("BriefInfoBtn"); // NOI18N
    BriefInfoBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            BriefInfoBtnMouseClicked(evt);
          }
        });

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

    LoggingAreaTA.setColumns(20);
    LoggingAreaTA.setRows(5);
    LoggingAreaTA.setName("LoggingAreaTA"); // NOI18N
    jScrollPane2.setViewportView(LoggingAreaTA);

    CountInstancesBtn.setText(resourceMap.getString("CountInstancesBtn.text")); // NOI18N
    CountInstancesBtn.setName("CountInstancesBtn"); // NOI18N
    CountInstancesBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            CountInstancesBtnMouseClicked(evt);
          }
        });

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

    QueriesCmb.setName("QueriesCmb"); // NOI18N
    QueriesCmb.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            QueriesCmbItemStateChanged(evt);
          }
        });

    LoadQueriesBtn.setText(resourceMap.getString("LoadQueriesBtn.text")); // NOI18N
    LoadQueriesBtn.setName("LoadQueriesBtn"); // NOI18N
    LoadQueriesBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            LoadQueriesBtnMouseClicked(evt);
          }
        });

    RunThisQueryBtn.setText(resourceMap.getString("RunThisQueryBtn.text")); // NOI18N
    RunThisQueryBtn.setName("RunThisQueryBtn"); // NOI18N
    RunThisQueryBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            RunThisQueryBtnMouseClicked(evt);
          }
        });

    RunAllQueriesBtn.setText(resourceMap.getString("RunAllQueriesBtn.text")); // NOI18N
    RunAllQueriesBtn.setName("RunAllQueriesBtn"); // NOI18N
    RunAllQueriesBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            RunAllQueriesBtnMouseClicked(evt);
          }
        });

    ExitBtn.setText(resourceMap.getString("ExitBtn.text")); // NOI18N
    ExitBtn.setName("ExitBtn"); // NOI18N
    ExitBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            ExitBtnMouseClicked(evt);
          }
        });

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

    ClearQueriesBtn.setText(resourceMap.getString("ClearQueriesBtn.text")); // NOI18N
    ClearQueriesBtn.setName("ClearQueriesBtn"); // NOI18N
    ClearQueriesBtn.addMouseListener(
        new java.awt.event.MouseAdapter() {
          public void mouseClicked(java.awt.event.MouseEvent evt) {
            ClearQueriesBtnMouseClicked(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                jScrollPane2,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                478,
                                Short.MAX_VALUE)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.LEADING,
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jButton2)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        334,
                                        Short.MAX_VALUE)
                                    .addComponent(ExitBtn))
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.LEADING,
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jLabel3)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        jTextField1,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        427,
                                        Short.MAX_VALUE))
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.LEADING,
                                layout
                                    .createSequentialGroup()
                                    .addComponent(JessTestBtn)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(EvaluateJessRule)
                                    .addGap(26, 26, 26)
                                    .addComponent(
                                        JessStringTF,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        77,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jLabel5)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        DurationTF,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        171,
                                        Short.MAX_VALUE))
                            .addComponent(
                                jScrollPane3,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                478,
                                Short.MAX_VALUE)
                            .addComponent(
                                jScrollPane1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                478,
                                Short.MAX_VALUE)
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.LEADING,
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel4)
                                            .addComponent(jLabel1)
                                            .addComponent(jLabel2)
                                            .addComponent(jLabel6))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                ProjectNameTF,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                404,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                jTextField4,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                404,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                jPasswordField1,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                404,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                jTextField2,
                                                javax.swing.GroupLayout.Alignment.TRAILING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                404,
                                                Short.MAX_VALUE)))
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.LEADING,
                                layout
                                    .createSequentialGroup()
                                    .addComponent(ConnectKnowledgeBaseBtn)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(BriefInfoBtn)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(CountInstancesBtn)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        ClassNameTF,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        148,
                                        Short.MAX_VALUE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING,
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(SPARQL2JessBtn)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addComponent(SparqlBtn)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addComponent(
                                                        ClearQueriesBtn,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        104,
                                                        Short.MAX_VALUE))
                                            .addGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING,
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(LoadQueriesBtn)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addComponent(
                                                        QueriesCmb, 0, 185, Short.MAX_VALUE)))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addComponent(RunThisQueryBtn)
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addComponent(RunAllQueriesBtn))
                                            .addComponent(
                                                jCheckBox1,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                169,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1)
                            .addComponent(
                                jTextField4,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(
                                jTextField2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2)
                            .addComponent(
                                jPasswordField1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(
                                ProjectNameTF,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ConnectKnowledgeBaseBtn)
                            .addComponent(BriefInfoBtn)
                            .addComponent(CountInstancesBtn)
                            .addComponent(
                                ClassNameTF,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                QueriesCmb,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(LoadQueriesBtn)
                            .addComponent(RunThisQueryBtn)
                            .addComponent(RunAllQueriesBtn))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(SparqlBtn)
                            .addComponent(jCheckBox1)
                            .addComponent(SPARQL2JessBtn)
                            .addComponent(ClearQueriesBtn))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jScrollPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        117,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(JessTestBtn)
                            .addComponent(EvaluateJessRule)
                            .addComponent(
                                JessStringTF,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel5)
                            .addComponent(
                                DurationTF,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(4, 4, 4)
                    .addComponent(
                        jScrollPane3,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        146,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jLabel3)
                            .addComponent(
                                jTextField1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jButton2)
                            .addComponent(ExitBtn))));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #10
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();
    jButton1 = new javax.swing.JButton();
    jButton2 = new javax.swing.JButton();
    jButton4 = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    jComboBox1 = new javax.swing.JComboBox();
    jLabel1 = new javax.swing.JLabel();
    jButton3 = new javax.swing.JButton();
    jTextField1 = new javax.swing.JTextField();
    jLabel2 = new javax.swing.JLabel();
    jButton5 = new javax.swing.JButton();
    jLabel3 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    jButton1.setText("Select Course");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    jButton2.setText("Add Course");
    jButton2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
          }
        });

    jButton4.setText("Log out");
    jButton4.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton4ActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(
                                jButton4,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jButton2,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jButton1,
                                javax.swing.GroupLayout.Alignment.LEADING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addContainerGap(20, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addGap(50, 50, 50)
                    .addComponent(
                        jButton1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        44,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jButton2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        44,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jButton4,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        42,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(191, Short.MAX_VALUE)));

    jPanel2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    jComboBox1.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"Item 1", "Item 2", "Item 3", "Item 4"}));
    jComboBox1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jComboBox1ActionPerformed(evt);
          }
        });

    jLabel1.setText("Select a course from dropdown of enrolled courses");

    jButton3.setText("Continue");
    jButton3.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton3ActionPerformed(evt);
          }
        });

    jLabel2.setText("Enter Token below to add a new course");

    jButton5.setText("Sign Up");
    jButton5.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton5ActionPerformed(evt);
          }
        });

    jLabel3.setText("Enrollment Message");

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                jPanel2Layout
                    .createSequentialGroup()
                    .addGap(0, 27, Short.MAX_VALUE)
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jComboBox1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                325,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jLabel3,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                316,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(39, 39, 39))
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addGap(130, 130, 130)
                                    .addComponent(
                                        jTextField1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        127,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addGap(144, 144, 144)
                                    .addComponent(
                                        jButton3,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        91,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addGap(78, 78, 78)
                                    .addComponent(
                                        jLabel2,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        211,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addGap(143, 143, 143)
                                    .addComponent(
                                        jButton5,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        94,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                jPanel2Layout
                                    .createSequentialGroup()
                                    .addGap(60, 60, 60)
                                    .addComponent(jLabel1)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addGap(30, 30, 30)
                    .addComponent(
                        jLabel3,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        21,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jLabel1)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jComboBox1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        32,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jButton3,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        34,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jLabel2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        22,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        jTextField1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        32,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jButton5,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        36,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    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(
                        jPanel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel2,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                jPanel2,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jPanel1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addContainerGap()));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #11
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
Пример #12
0
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jComboBox1 = new javax.swing.JComboBox();
    jTextField1 = new javax.swing.JTextField();
    jLabel1 = new javax.swing.JLabel();
    jLabel2 = new javax.swing.JLabel();
    jTextField2 = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jLabel5 = new javax.swing.JLabel();
    jLabel3 = new javax.swing.JLabel();
    jTextField3 = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    jTextArea1 = new javax.swing.JTextArea();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jComboBox1.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"Item 1", "Item 2", "Item 3", "Item 4"}));

    jLabel1.setText("Nome da Base de Datos");

    jLabel2.setText("Nome da táboa");

    jButton1.setText("Enviar");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    jLabel5.setText("Resposta");

    jLabel3.setText("Novo nome da táboa");

    jTextArea1.setColumns(20);
    jTextArea1.setRows(5);
    jScrollPane1.setViewportView(jTextArea1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addGroup(
                                                        layout
                                                            .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment
                                                                    .TRAILING,
                                                                false)
                                                            .addComponent(
                                                                jTextField1,
                                                                javax.swing.GroupLayout
                                                                    .DEFAULT_SIZE,
                                                                181,
                                                                Short.MAX_VALUE)
                                                            .addComponent(
                                                                jLabel1,
                                                                javax.swing.GroupLayout.Alignment
                                                                    .LEADING))
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED,
                                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                                        Short.MAX_VALUE))
                                            .addComponent(jComboBox1, 0, 187, Short.MAX_VALUE))
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(
                                                layout
                                                    .createSequentialGroup()
                                                    .addGroup(
                                                        layout
                                                            .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment
                                                                    .LEADING)
                                                            .addComponent(jLabel2)
                                                            .addComponent(
                                                                jTextField2,
                                                                javax.swing.GroupLayout
                                                                    .PREFERRED_SIZE,
                                                                185,
                                                                javax.swing.GroupLayout
                                                                    .PREFERRED_SIZE))
                                                    .addPreferredGap(
                                                        javax.swing.LayoutStyle.ComponentPlacement
                                                            .RELATED)
                                                    .addGroup(
                                                        layout
                                                            .createParallelGroup(
                                                                javax.swing.GroupLayout.Alignment
                                                                    .LEADING)
                                                            .addComponent(jLabel3)
                                                            .addComponent(
                                                                jTextField3,
                                                                javax.swing.GroupLayout
                                                                    .DEFAULT_SIZE,
                                                                205,
                                                                Short.MAX_VALUE)))
                                            .addComponent(
                                                jButton1,
                                                javax.swing.GroupLayout.Alignment.TRAILING,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                396,
                                                Short.MAX_VALUE)))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(203, 203, 203)
                                    .addComponent(jLabel5)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        jScrollPane1,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        341,
                                        Short.MAX_VALUE)))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel1)
                                    .addComponent(jLabel2))
                            .addComponent(jLabel3))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jTextField1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jTextField2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                jTextField3,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jComboBox1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton1))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jScrollPane1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                70,
                                Short.MAX_VALUE)
                            .addComponent(jLabel5))
                    .addContainerGap()));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #13
0
  public NumbrixGUI() throws ParseException { // Board gameBoard) throws ParseException{

    // Board
    this.gameBoard = new Board();

    // Container
    setTitle(TITLE);
    setSize(WIDTH, HEIGHT);
    setDefaultCloseOperation(EXIT_ON_CLOSE);

    // About Frame
    jFrameAbout = new javax.swing.JFrame();
    jFrameAbout.setResizable(false);
    jFrameAbout.setPreferredSize(new Dimension(500, 300));

    jTextAreaAbout = new javax.swing.JTextArea();
    jTextAreaAbout.setBackground(new java.awt.Color(240, 240, 240));
    jTextAreaAbout.setColumns(20);
    jTextAreaAbout.setRows(10);
    jTextAreaAbout.setText(
        "\t\tNumbrix Version 1\n\nClass Project for Artificial Intelligence course.\nUniversity of Florida\nCISE\n\n\n\n\nby Rainer Ledesma\nhttp://www.cise.ufl.edu/~rledesma/\n");
    jTextAreaAbout.setFont(new java.awt.Font("Agency FB", 1, 20)); // NOI18N
    jTextAreaAbout.setEditable(false);
    jTextAreaAbout.setPreferredSize(new Dimension(500, 300));

    javax.swing.GroupLayout jFrameAboutLayout =
        new javax.swing.GroupLayout(jFrameAbout.getContentPane());
    jFrameAbout.getContentPane().setLayout(jFrameAboutLayout);
    jFrameAboutLayout.setHorizontalGroup(
        jFrameAboutLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jFrameAboutLayout
                    .createSequentialGroup()
                    .addGap(11, 11, 11)
                    .addComponent(
                        jTextAreaAbout,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jFrameAboutLayout.setVerticalGroup(
        jFrameAboutLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jFrameAboutLayout
                    .createSequentialGroup()
                    .addGap(0, 16, Short.MAX_VALUE)
                    .addComponent(
                        jTextAreaAbout,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        267,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 17, Short.MAX_VALUE)));
    //

    // Instructions Frame
    jFrameInstructions = new javax.swing.JFrame();
    jFrameInstructions.setResizable(false);
    jFrameInstructions.setPreferredSize(new Dimension(500, 300));

    jTextAreaInstructions = new javax.swing.JTextArea();
    jTextAreaInstructions.setBackground(new java.awt.Color(240, 240, 240));
    jTextAreaInstructions.setColumns(20);
    jTextAreaInstructions.setRows(10);
    jTextAreaInstructions.setText(
        "\t\tNumbrix\n"
            + "The object of Numbrix is to fill the board with sequence of consecutive \n"
            + "numbers from 1 to the maximun cell count. The numbers must fillow a \n"
            + "horizontal or vertical path (no diagonals)\n");
    jTextAreaInstructions.setFont(new java.awt.Font("Agency FB", 1, 20)); // NOI18N
    jTextAreaInstructions.setEditable(false);
    jTextAreaInstructions.setPreferredSize(new Dimension(500, 300));

    javax.swing.GroupLayout jFrameInstructionsLayout =
        new javax.swing.GroupLayout(jFrameInstructions.getContentPane());
    jFrameInstructions.getContentPane().setLayout(jFrameInstructionsLayout);
    jFrameInstructionsLayout.setHorizontalGroup(
        jFrameInstructionsLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jFrameInstructionsLayout
                    .createSequentialGroup()
                    .addGap(11, 11, 11)
                    .addComponent(
                        jTextAreaInstructions,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jFrameInstructionsLayout.setVerticalGroup(
        jFrameInstructionsLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jFrameInstructionsLayout
                    .createSequentialGroup()
                    .addGap(0, 16, Short.MAX_VALUE)
                    .addComponent(
                        jTextAreaInstructions,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        267,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 17, Short.MAX_VALUE)));
    //

    // File Chooser
    jFrameFileChooser = new javax.swing.JFrame();
    jFileChooser = new javax.swing.JFileChooser();
    jFileChooser.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            try {
              jFileChooserActionPerformed(evt);
            } catch (Exception ex) {
              JOptionPane.showMessageDialog(frame, "File Exception");
            }
          }
        });

    javax.swing.GroupLayout jFrameFileChooserLayout =
        new javax.swing.GroupLayout(jFrameFileChooser.getContentPane());
    jFrameFileChooser.getContentPane().setLayout(jFrameFileChooserLayout);
    jFrameFileChooserLayout.setHorizontalGroup(
        jFrameFileChooserLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 618, Short.MAX_VALUE)
            .addGroup(
                jFrameFileChooserLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                        jFrameFileChooserLayout
                            .createSequentialGroup()
                            .addGap(18, 18, 18)
                            .addComponent(
                                jFileChooser,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addGap(18, 18, 18))));
    jFrameFileChooserLayout.setVerticalGroup(
        jFrameFileChooserLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 456, Short.MAX_VALUE)
            .addGroup(
                jFrameFileChooserLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                        jFrameFileChooserLayout
                            .createSequentialGroup()
                            .addGap(27, 27, 27)
                            .addComponent(
                                jFileChooser,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addGap(32, 32, 32))));
    //

    // SidePanel
    jPanelSideBar = new javax.swing.JPanel();
    jButtonRESET = new javax.swing.JButton();
    jButtonSOLVE = new javax.swing.JButton();
    jButtonNEWGAME = new javax.swing.JButton();
    jLabelTIMER = new javax.swing.JLabel();
    jButtonPAUSE = new javax.swing.JButton();

    jButtonRESET.setText("RESET");
    jButtonRESET.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonRESETActionPerformed(evt);
          }
        });
    jButtonSOLVE.setText("SOLVE");
    jButtonSOLVE.setEnabled(false);
    jButtonSOLVE.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            try {
              jButtonSOLVEActionPerformed(evt);
            } catch (IOException ex) {
              Logger.getLogger(NumbrixGUI.class.getName()).log(Level.SEVERE, null, ex);
            }
          }
        });
    jButtonNEWGAME.setText("NEW GAME");
    jButtonNEWGAME.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonNEWGAMEActionPerformed(evt);
          }
        });
    jLabelTIMER.setText("TIMER");
    jLabelTIMER.setFont(new java.awt.Font("Agency FB", 1, 18));
    jButtonPAUSE.setText("PAUSE");
    jButtonPAUSE.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButtonPAUSEActionPerformed(evt);
          }
        });
    jLabelClock = new javax.swing.JLabel();
    jLabelClock.setFont(new java.awt.Font("Agency FB", 1, 24)); // NOI18N
    jLabelClock.setText("10 : 99 : 60");

    javax.swing.GroupLayout jPanelSideBarLayout = new javax.swing.GroupLayout(jPanelSideBar);
    jPanelSideBar.setLayout(jPanelSideBarLayout);
    jPanelSideBarLayout.setHorizontalGroup(
        jPanelSideBarLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanelSideBarLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanelSideBarLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jButtonRESET,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jButtonSOLVE,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jButtonNEWGAME,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                136,
                                Short.MAX_VALUE)
                            .addComponent(
                                jButtonPAUSE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addGroup(
                                jPanelSideBarLayout
                                    .createSequentialGroup()
                                    .addGroup(
                                        jPanelSideBarLayout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabelTIMER)
                                            .addComponent(
                                                jLabelClock,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                97,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGap(0, 0, Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanelSideBarLayout.setVerticalGroup(
        jPanelSideBarLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                jPanelSideBarLayout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jLabelTIMER)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jLabelClock,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        32,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jButtonPAUSE)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 229, Short.MAX_VALUE)
                    .addComponent(jButtonNEWGAME)
                    .addGap(18, 18, 18)
                    .addComponent(jButtonRESET)
                    .addGap(18, 18, 18)
                    .addComponent(jButtonSOLVE)
                    .addContainerGap()));
    ////////

    // Menu
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMenuItemNewGame = new javax.swing.JMenuItem();
    jMenuItemExit = new javax.swing.JMenuItem();
    jMenu2 = new javax.swing.JMenu();
    jMenuItemInstructions = new javax.swing.JMenuItem();
    jMenuItemAbout = new javax.swing.JMenuItem();

    jMenu1.setText("File");
    jMenu2.setText("Edit");

    jMenuItemNewGame.setText("New Game");
    jMenuItemExit.setText("Exit");
    jMenuItemInstructions.setText("Instructions");
    jMenuItemAbout.setText("About Numbrix");

    jMenuBar1.add(jMenu1);
    jMenuBar1.add(jMenu2);
    jMenu1.add(jMenuItemNewGame);
    jMenu1.add(jMenuItemExit);
    jMenu2.add(jMenuItemInstructions);
    jMenu2.add(jMenuItemAbout);

    setJMenuBar(jMenuBar1);

    jMenuItemNewGame.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemNewGameActionPerformed(evt);
          }
        });
    jMenuItemExit.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemExitActionPerformed(evt);
          }
        });
    jMenuItemInstructions.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemInstructionsActionPerformed(evt);
          }
        });
    jMenuItemAbout.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMenuItemAboutActionPerformed(evt);
          }
        });
    //

    // SolvedBoardPanel
    jPanelSolvedBoard = new javax.swing.JPanel();
    jPanelSolvedBoard.setBackground(new java.awt.Color(255, 255, 255));

    // Solved Board Frame
    jFrameSolvedBoard = new javax.swing.JFrame();
    jFrameSolvedBoard.setTitle("Numbrix Solution");
    javax.swing.GroupLayout jFrameSolvedBoardLayout =
        new javax.swing.GroupLayout(jFrameSolvedBoard.getContentPane());
    jFrameSolvedBoard.getContentPane().setLayout(jFrameSolvedBoardLayout);
    jFrameSolvedBoardLayout.setHorizontalGroup(
        jFrameSolvedBoardLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 400, Short.MAX_VALUE)
            .addGroup(
                jFrameSolvedBoardLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(
                        jPanelSolvedBoard,
                        javax.swing.GroupLayout.Alignment.TRAILING,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        400,
                        Short.MAX_VALUE)));
    jFrameSolvedBoardLayout.setVerticalGroup(
        jFrameSolvedBoardLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
            .addGroup(
                jFrameSolvedBoardLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(
                        jPanelSolvedBoard,
                        javax.swing.GroupLayout.Alignment.TRAILING,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        300,
                        Short.MAX_VALUE)));

    // BoardPanel
    boardPanel = new javax.swing.JPanel();
    boardPanel.setBackground(new java.awt.Color(255, 255, 255));
    // Clock
    gameTimer = new GameTimer(jLabelClock);
    this.gameTimer.start();
    this.gameTimer.run();

    // Initialize
    // init();

    // Container Layout
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        boardPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 488, Short.MAX_VALUE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jPanelSideBar,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                boardPanel,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jPanelSideBar,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addContainerGap()));
  }
Пример #14
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();
    jServer = new javax.swing.JComboBox();
    jScrollPane1 = new javax.swing.JScrollPane();
    jDBList = new javax.swing.JTextArea();
    jPanel2 = new javax.swing.JPanel();
    jConfirm = new javax.swing.JButton();
    jCancel = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jServer.setModel(new javax.swing.DefaultComboBoxModel(new String[] {"AWS", "Local"}));
    jServer.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jServerActionPerformed(evt);
          }
        });

    jDBList.setColumns(20);
    jDBList.setRows(5);
    jScrollPane1.setViewportView(jDBList);

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                jServer, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jScrollPane1))
                    .addContainerGap()));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jServer)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)
                    .addContainerGap()));

    jConfirm.setText("Confirm");
    jConfirm.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jConfirmActionPerformed(evt);
          }
        });

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

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addGap(25, 25, 25)
                    .addComponent(
                        jConfirm, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .addGap(18, 18, 18)
                    .addComponent(
                        jCancel, javax.swing.GroupLayout.DEFAULT_SIZE, 128, Short.MAX_VALUE)
                    .addGap(35, 35, 35)));
    jPanel2Layout.setVerticalGroup(
        jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel2Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel2Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jConfirm,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jCancel,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addGap(20, 20, 20)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(
                jPanel2,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                javax.swing.GroupLayout.DEFAULT_SIZE,
                Short.MAX_VALUE)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jPanel1,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(
                        jPanel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jPanel2,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #15
0
  /**
   * This method is called from within the init() method 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() {

    jLabel1 = new javax.swing.JLabel();
    jSeparator1 = new javax.swing.JSeparator();
    jLabel2 = new javax.swing.JLabel();
    jComboBox1 = new javax.swing.JComboBox();
    jButton1 = new javax.swing.JButton();
    jLabel3 = new javax.swing.JLabel();
    jLabel4 = new javax.swing.JLabel();
    jTextField1 = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    jXTable3 = new javax.swing.JTable();
    jButton2 = new javax.swing.JButton();

    jLabel1.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
    jLabel1.setText("Cinéma Rennequinepolis");

    jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    jLabel2.setText("Liste des séance");

    jComboBox1.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"Aujourd'hui", "Demain", "Après-Demain"}));
    jComboBox1.addItemListener(
        new java.awt.event.ItemListener() {
          public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jComboBox1ItemStateChanged(evt);
          }
        });

    jButton1.setText("Commander");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    jLabel3.setText("(Sélecionnez la séance qui vous intéresse et indiquez le nombre de tickets )");

    jLabel4.setText("Ticket :");

    jXTable3.setModel(
        new javax.swing.table.DefaultTableModel(
            new Object[][] {
              {null, null, null, null},
              {null, null, null, null},
              {null, null, null, null},
              {null, null, null, null}
            },
            new String[] {"Film", "Heure", "Salle", "Place libres"}) {
          boolean[] canEdit = new boolean[] {false, false, true, false};

          public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit[columnIndex];
          }
        });
    jScrollPane1.setViewportView(jXTable3);
    jXTable3.getColumnModel().getColumn(1).setMinWidth(100);
    jXTable3.getColumnModel().getColumn(1).setPreferredWidth(100);
    jXTable3.getColumnModel().getColumn(1).setMaxWidth(100);
    jXTable3.getColumnModel().getColumn(2).setMinWidth(40);
    jXTable3.getColumnModel().getColumn(2).setPreferredWidth(40);
    jXTable3.getColumnModel().getColumn(2).setMaxWidth(40);
    jXTable3.getColumnModel().getColumn(3).setMinWidth(70);
    jXTable3.getColumnModel().getColumn(3).setPreferredWidth(70);
    jXTable3.getColumnModel().getColumn(3).setMaxWidth(70);

    jButton2.setText("jButton2");
    jButton2.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton2ActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel3)
                    .addContainerGap())
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        jComboBox1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        102,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(42, 42, 42)
                                    .addComponent(jButton2))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(77, 77, 77)
                                    .addComponent(jLabel1))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(131, 131, 131)
                                    .addComponent(jLabel2))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addContainerGap()
                                    .addComponent(
                                        jScrollPane1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        354,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap())
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jButton1)
                            .addGroup(
                                layout
                                    .createParallelGroup(
                                        javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addGroup(
                                        layout
                                            .createSequentialGroup()
                                            .addComponent(jLabel4)
                                            .addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(jTextField1))
                                    .addComponent(
                                        jButton1, javax.swing.GroupLayout.Alignment.TRAILING)))
                    .addGap(154, 154, 154)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(6, 6, 6)
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(
                        jSeparator1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        10,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel2)
                    .addGap(7, 7, 7)
                    .addComponent(jLabel3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                jComboBox1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jButton2))
                    .addGap(18, 18, 18)
                    .addComponent(
                        jScrollPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        159,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel4)
                            .addComponent(
                                jTextField1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addComponent(jButton1)
                    .addContainerGap()));
  } // </editor-fold>//GEN-END:initComponents
Пример #16
0
  @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
Пример #17
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() {

    jTabbedPane1 = new javax.swing.JTabbedPane();
    jPanel1 = new javax.swing.JPanel();
    jScrollPane1 = new javax.swing.JScrollPane();
    jList1 = new javax.swing.JList();
    jButton1 = new javax.swing.JButton();
    jProgressBar1 = new javax.swing.JProgressBar();
    jLabel1 = new javax.swing.JLabel();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("BukkitUI | Install/Update Server");

    jList1.addListSelectionListener(
        new javax.swing.event.ListSelectionListener() {
          public void valueChanged(javax.swing.event.ListSelectionEvent evt) {
            jList1ValueChanged(evt);
          }
        });
    jScrollPane1.setViewportView(jList1);

    jButton1.setText("Refresh");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        jPanel1Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                            .addComponent(jButton1)
                            .addComponent(
                                jScrollPane1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                342,
                                Short.MAX_VALUE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(
        jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                jPanel1Layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(
                        jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 281, Short.MAX_VALUE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jButton1)
                    .addContainerGap()));

    jTabbedPane1.addTab("Install Server", jPanel1);

    jProgressBar1.setString("");
    jProgressBar1.setStringPainted(true);

    jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);

    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)
                            .addComponent(jTabbedPane1)
                            .addComponent(
                                jProgressBar1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE)
                            .addComponent(
                                jLabel1,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                Short.MAX_VALUE))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jTabbedPane1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(
                        jProgressBar1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #18
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() {

    WelcomeLabel = new javax.swing.JLabel();
    UsernameLoginLabel = new javax.swing.JLabel();
    PasswordLoginLabel = new javax.swing.JLabel();
    UsernameLogin = new javax.swing.JTextField();
    SignInButton = new javax.swing.JButton();
    RegisterButton = new javax.swing.JButton();
    PasswordLogin = new javax.swing.JPasswordField();
    SetSocket = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

    WelcomeLabel.setFont(new java.awt.Font("Times New Roman", 0, 24)); // NOI18N
    WelcomeLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    WelcomeLabel.setText("Welcome!");

    UsernameLoginLabel.setText("Username:"******"Password:"******"Sign in");
    SignInButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            SignInButtonActionPerformed(evt);
          }
        });

    RegisterButton.setText("Register");
    RegisterButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            RegisterButtonActionPerformed(evt);
          }
        });

    PasswordLogin.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            PasswordLoginActionPerformed(evt);
          }
        });

    SetSocket.setText("Set Socket");
    SetSocket.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            SetSocketActionPerformed(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()
                    .addComponent(RegisterButton)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addComponent(SetSocket)
                    .addContainerGap())
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(54, 54, 54)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(UsernameLoginLabel)
                            .addComponent(PasswordLoginLabel))
                    .addGap(18, 18, 18)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                PasswordLogin,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                138,
                                Short.MAX_VALUE)
                            .addComponent(
                                WelcomeLabel,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                138,
                                Short.MAX_VALUE)
                            .addComponent(
                                UsernameLogin,
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                138,
                                Short.MAX_VALUE))
                    .addContainerGap(111, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap(160, Short.MAX_VALUE)
                    .addComponent(SignInButton)
                    .addGap(150, 150, 150)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(55, 55, 55)
                    .addComponent(
                        WelcomeLabel,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        41,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                UsernameLogin,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(UsernameLoginLabel))
                    .addGap(23, 23, 23)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(PasswordLoginLabel)
                            .addComponent(
                                PasswordLogin,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(31, 31, 31)
                    .addComponent(SignInButton)
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(RegisterButton)
                            .addComponent(SetSocket))
                    .addContainerGap()));

    pack();
  } // </editor-fold>//GEN-END:initComponents
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    address_label = new javax.swing.JLabel();
    number_label = new javax.swing.JLabel();
    license_label = new javax.swing.JLabel();
    address_text = new javax.swing.JTextField();
    number_text = new javax.swing.JTextField();
    license_text = new javax.swing.JTextField();
    register_label = new javax.swing.JLabel();
    register_button = new javax.swing.JButton();
    back_button = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle("Registor for Super market");

    address_label.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
    address_label.setText("Residential address :");

    number_label.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
    number_label.setText("Telephone  number :");

    license_label.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
    license_label.setText("Driving license number :");

    register_label.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
    register_label.setText("Register");

    register_button.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
    register_button.setText("Register");
    register_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            register_buttonActionPerformed(evt);
          }
        });

    back_button.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
    back_button.setText("Back");
    back_button.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            back_buttonActionPerformed(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()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(69, 69, 69)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                address_label,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                144,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                number_label,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                121,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(license_label))
                                    .addGap(18, 18, 18)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                number_text,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                215,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                license_text,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                215,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                address_text,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                215,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(204, 204, 204)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(
                                                register_button,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                back_button,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE))))
                    .addContainerGap(54, Short.MAX_VALUE))
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addGap(0, 0, Short.MAX_VALUE)
                    .addComponent(
                        register_label,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        235,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(68, 68, 68)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(24, 24, 24)
                    .addComponent(register_label)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                address_label,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                36,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(7, 7, 7)
                                    .addComponent(
                                        address_text,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        29,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                number_label,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                26,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(
                                number_text,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                33,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(
                                license_label,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                34,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        license_text,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        30,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(6, 6, 6)))
                    .addGap(26, 26, 26)
                    .addComponent(register_button)
                    .addGap(18, 18, 18)
                    .addComponent(back_button)
                    .addContainerGap(32, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #20
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() {

    jLabel1 = new javax.swing.JLabel();
    txtNombreArchivo = new javax.swing.JTextField();
    btnAbrir = new javax.swing.JButton();
    btnCerrar = new javax.swing.JButton();
    jScrollPane1 = new javax.swing.JScrollPane();
    txtMostrarInformacionArchivo = new javax.swing.JTextArea();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jLabel1.setText("Ingrese el nombre del archivo");

    btnAbrir.setText("Abrir");
    btnAbrir.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnAbrirActionPerformed(evt);
          }
        });

    btnCerrar.setText("Cerrar");
    btnCerrar.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCerrarActionPerformed(evt);
          }
        });

    txtMostrarInformacionArchivo.setColumns(20);
    txtMostrarInformacionArchivo.setRows(5);
    jScrollPane1.setViewportView(txtMostrarInformacionArchivo);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(30, 30, 30)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jScrollPane1)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING, false)
                                            .addComponent(
                                                jLabel1,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE)
                                            .addComponent(txtNombreArchivo))
                                    .addGap(34, 34, 34)
                                    .addComponent(btnAbrir)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(btnCerrar)))
                    .addContainerGap(66, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(27, 27, 27)
                    .addComponent(jLabel1)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(
                                txtNombreArchivo,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnAbrir)
                            .addComponent(btnCerrar))
                    .addGap(30, 30, 30)
                    .addComponent(
                        jScrollPane1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        125,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(70, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
Пример #21
0
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    jMenu1 = new javax.swing.JMenu();
    jMenu2 = new javax.swing.JMenu();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu3 = new javax.swing.JMenu();
    jMenu4 = new javax.swing.JMenu();
    jMenuBar2 = new javax.swing.JMenuBar();
    jMenu5 = new javax.swing.JMenu();
    jMenu6 = new javax.swing.JMenu();
    preview = new javax.swing.JButton();
    printer = new javax.swing.JButton();
    make = new javax.swing.JButton();
    heading = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    footer = new javax.swing.JTextArea();
    label1 = new java.awt.Label();
    label2 = new java.awt.Label();
    sourceTemplate = new javax.swing.JTextField();
    jButton1 = new javax.swing.JButton();
    jLabel1 = new javax.swing.JLabel();
    jSeparator1 = new javax.swing.JSeparator();
    jSeparator2 = new javax.swing.JSeparator();
    defaulteAdress = new javax.swing.JCheckBox();
    defoleteTemlateNotFound = new javax.swing.JLabel();

    jMenu1.setText("jMenu1");

    jMenu2.setText("jMenu2");

    jMenu3.setText("File");
    jMenuBar1.add(jMenu3);

    jMenu4.setText("Edit");
    jMenuBar1.add(jMenu4);

    jMenu5.setText("File");
    jMenuBar2.add(jMenu5);

    jMenu6.setText("Edit");
    jMenuBar2.add(jMenu6);

    preview.setText("náhled");
    preview.setFocusable(false);
    preview.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            previewActionPerformed(evt);
          }
        });

    printer.setText("uložit do html souboru");
    printer.setFocusable(false);
    printer.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            printerActionPerformed(evt);
          }
        });

    make.setText("spracuj newsletter");
    make.setFocusable(false);
    make.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            makeActionPerformed(evt);
          }
        });

    footer.setColumns(15);
    footer.setLineWrap(true);
    footer.setRows(2);
    footer.setWrapStyleWord(true);
    jScrollPane1.setViewportView(footer);

    label1.setText("záhlaví");

    label2.setText("zápatí");

    sourceTemplate.setText("jTextField1");
    sourceTemplate.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            sourceTemplateActionPerformed(evt);
          }
        });

    jButton1.setText("vybrat místo šablony");
    jButton1.setFocusable(false);
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    jLabel1.setText("místo uložené šablony ");

    defaulteAdress.setText("výchozí uloženíá šablona");
    defaulteAdress.setToolTipText("");
    defaulteAdress.setActionCommand("");
    defaulteAdress.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            defaulteAdressActionPerformed(evt);
          }
        });

    defoleteTemlateNotFound.setForeground(java.awt.Color.red);
    defoleteTemlateNotFound.setText("nenašlo výchzí šablonu");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(10, 10, 10)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                heading,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                522,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jScrollPane1,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                522,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                label1,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                113,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                label2,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                116,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                        125,
                                        Short.MAX_VALUE)
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(
                                                make,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                preview,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                printer,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                209,
                                                Short.MAX_VALUE)))
                            .addComponent(jSeparator1)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(
                                                sourceTemplate,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                674,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(
                                                jLabel1,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                189,
                                                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(
                                                jButton1,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                defaulteAdress,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE)
                                            .addComponent(
                                                defoleteTemlateNotFound,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE))))
                    .addContainerGap())
            .addGroup(
                layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                        layout
                            .createSequentialGroup()
                            .addContainerGap()
                            .addComponent(
                                jSeparator2,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                856,
                                Short.MAX_VALUE)
                            .addContainerGap())));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jLabel1)
                                    .addGap(13, 13, 13)
                                    .addComponent(
                                        sourceTemplate,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        31,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(jButton1)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(defaulteAdress)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        defoleteTemlateNotFound,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        23,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(18, 18, 18)
                    .addComponent(
                        jSeparator1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        2,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(43, 43, 43)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        label1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        javax.swing.GroupLayout.DEFAULT_SIZE,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        heading,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        30,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(10, 10, 10)
                                    .addComponent(
                                        label2,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        21,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        jScrollPane1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        92,
                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        printer,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        36,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)
                                    .addComponent(
                                        preview,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        36,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(
                                        make,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        92,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(79, Short.MAX_VALUE))
            .addGroup(
                layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(
                        javax.swing.GroupLayout.Alignment.TRAILING,
                        layout
                            .createSequentialGroup()
                            .addContainerGap(409, Short.MAX_VALUE)
                            .addComponent(
                                jSeparator2,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGap(21, 21, 21))));
  } // </editor-fold>//GEN-END:initComponents
  /**
   * 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() {

    jButton1 = new javax.swing.JButton();
    imagePanel1 = new ImagePanel();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Google Maps Example");

    jButton1.setText("Retrieve Map");
    jButton1.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            jButton1ActionPerformed(evt);
          }
        });

    imagePanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));

    javax.swing.GroupLayout imagePanel1Layout = new javax.swing.GroupLayout(imagePanel1);
    imagePanel1.setLayout(imagePanel1Layout);
    imagePanel1Layout.setHorizontalGroup(
        imagePanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 397, Short.MAX_VALUE));
    imagePanel1Layout.setVerticalGroup(
        imagePanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 352, Short.MAX_VALUE));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(28, 28, 28)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(
                                imagePanel1,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGap(47, 47, 47)
                                    .addComponent(
                                        jButton1,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        316,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(30, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(25, 25, 25)
                    .addComponent(
                        imagePanel1,
                        javax.swing.GroupLayout.PREFERRED_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jButton1)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents