Esempio n. 1
0
  private void button1_addActionPerformed(ActionEvent e) {
    // TODO add your code here
    String message = null;
    User user = null;
    try {
      user =
          new User(
              textField1_name.getText(),
              textField2_emeil.getText(),
              Integer.valueOf(textField3_telefon.getText()));
      message = "Успешно создан";
      textField1_name.setText("");
      textField2_emeil.setText("");
      textField3_telefon.setText("");

    } catch (NumberFormatException ex) {
      message = "Разберитесь с телефоном";
    } finally {
      JOptionPane.showMessageDialog(this, message);
    }
    DefaultComboBoxModel<User> qwe = (DefaultComboBoxModel<User>) list1.getModel();
    qwe.addElement(user);
    // list1.setListData();
    // System.out.println(User.getSprUser());

  }
Esempio n. 2
0
 private void _setUpResources() {
   DefaultComboBoxModel dlm = new DefaultComboBoxModel();
   Set<String> keys = HEADING_LIST.keySet();
   for (String key : keys) {
     dlm.addElement(key);
   }
   mHeadingComboBox.setModel(dlm);
 }
Esempio n. 3
0
 private void setStudentsComboBox() {
   // call to get Students
   // studentList = ReportGenerator.staticList;
   // studentList = Arrays.asList();
   DefaultComboBoxModel model = new DefaultComboBoxModel(studentList.toArray());
   if (model.getSize() == 0) {
     model.addElement("No items");
   } else {
     model.setSelectedItem(studentList.get(0));
   }
   studentsComboBox.setModel(model);
   studentsComboBox.updateUI();
 }
Esempio n. 4
0
  /**
   * Constructs a ClutoTree diaplay which is initialized with tableModel as the data model, and the
   * given selection model.
   *
   * @param clutoSolution The clustering solution
   * @param tableContext The context which manages views and selections.
   * @param tableModel the data model for the parallel coordinate display
   */
  public ClutoTree(ClutoSolution clutoSolution, TableContext tableContext, TableModel tableModel) {
    ctx = tableContext;
    tm = tableModel;
    lsm = ctx.getRowSelectionModel(tm);

    // labelModel
    int ncol = tm.getColumnCount();
    for (int i = 0; i < ncol; i++) {
      labelModel.addElement(tm.getColumnName(i));
    }

    setLayout(new BorderLayout());
    btnP = new JToolBar();
    add(btnP, BorderLayout.NORTH);
    labelChoice.addItemListener(
        new ItemListener() {
          public void itemStateChanged(ItemEvent e) {
            if (e.getStateChange() == ItemEvent.SELECTED) {
              labelColumn = 0;
              String ln = (String) e.getItem();
              if (ln != null) {
                for (int c = 0; c < tm.getColumnCount(); c++) {
                  if (ln.equals(tm.getColumnName(c))) {
                    labelColumn = c;
                    break;
                  }
                }
              }
              graph.invalidate();
              validate();
              repaint();
            }
          }
        });
    btnP.add(labelChoice);

    graph = new SimpleGraph();
    graph.getGraphDisplay().setOpaque(true);
    graph.getGraphDisplay().setBackground(Color.white);
    graph.getGraphDisplay().setGridColor(new Color(220, 220, 220));
    graph.showGrid(false);
    graph.showAxis(BorderLayout.WEST, false);
    graph.showAxis(BorderLayout.EAST, true);
    graph.getAxisDisplay(BorderLayout.EAST).setZoomable(true);
    graph.getAxisDisplay(BorderLayout.EAST).setAxisLabeler(labeler);
    ((LinearAxis) graph.getYAxis()).setTickIncrement(-1.);
    graph.getAxisDisplay(BorderLayout.SOUTH).setZoomable(true);
    gs = new GraphSegments();
    gs.setColor(Color.blue);
    idxSelColor = new IndexSelectColor(Color.cyan, null, new DefaultListSelectionModel());
    gs.setIndexedColor(idxSelColor);
    graph.addGraphItem(gs);
    graph.getGraphDisplay().addMouseListener(ma);

    add(graph);
    if (lsm != null) {
      lsm.addListSelectionListener(selListener);
    }
    display(makeTree(clutoSolution));
  }
Esempio n. 5
0
  @Override
  public void adoptElement(SceneElement elem) {
    if (!(elem instanceof NenyaImageSceneElement
        || elem instanceof NenyaTileSceneElement
        || elem instanceof NenyaComponentSceneElement)) {
      enableEditor(false);
      return;
    }

    DefaultComboBoxModel dcm = (DefaultComboBoxModel) itemList.getModel();

    // Important: Work on a copy, not on the original. Otherwise we mess up the undomanager
    sceneElement = elem.copy();

    if ((sceneElement instanceof NenyaImageSceneElement) && !locked) {
      dcm.removeAllElements();
      String[] tmp = ((NenyaImageSceneElement) sceneElement).getPath();
      dcm.addElement(tmp[tmp.length - 1]);
    }
    if ((sceneElement instanceof NenyaTileSceneElement) && !locked) {
      dcm.removeAllElements();
      dcm.addElement(((NenyaTileSceneElement) sceneElement).getTileName());
    }
    if ((sceneElement instanceof NenyaComponentSceneElement) && !locked) {
      dcm.removeAllElements();
      NenyaComponentItem[] ni = ((NenyaComponentSceneElement) sceneElement).getComponents();
      for (NenyaComponentItem element : ni) {
        dcm.addElement(element);
      }
    }

    try {
      ClassedItem[] cols = null;
      if (elem instanceof NenyaTileSceneElement)
        cols = ((NenyaTileSceneElement) elem).getColorList();
      if (elem instanceof NenyaImageSceneElement)
        cols = ((NenyaImageSceneElement) elem).getColorList();
      if (elem instanceof NenyaComponentSceneElement) {
        NenyaComponentItem nci = (NenyaComponentItem) dcm.getSelectedItem();
        cols = nci.getColorList();
      }
      Vector<TreePath> collect = new Vector<TreePath>();
      TreeNode root = (TreeNode) colors.getModel().getRoot();
      for (ClassedItem col : cols) {
        String[] tmp = {root.toString(), col.getClassName(), col.getItemName()};
        collect.add(TreeUtil.findPath(root, tmp));
      }
      TreePath[] path = collect.toArray(new TreePath[0]);
      colors.getSelectionModel().setSelectionPaths(path);
    } catch (Exception e) {
      // Either the tree is filtered away or the selected item is not colorized.
    }

    enableEditor(true);
    itemList.setEnabled(elem instanceof NenyaComponentSceneElement);
  }
  public ResourceEditor(
      @Nullable ResourceType[] types, Set<AttributeFormat> formats, @Nullable String[] values) {
    myTypes = types;
    myIsDimension = formats.contains(AttributeFormat.Dimension);

    if (formats.contains(AttributeFormat.Boolean)) {
      myCheckBox = new JCheckBox();
      myEditor =
          new ComponentWithBrowseButton<JCheckBox>(myCheckBox, null) {
            @Override
            public Dimension getPreferredSize() {
              return getComponentPreferredSize();
            }
          };
      myCheckBox.addItemListener(
          new ItemListener() {
            @Override
            public void itemStateChanged(ItemEvent e) {
              if (!myIgnoreCheckBoxValue) {
                myBooleanResourceValue = null;
                fireValueCommitted(false, true);
              }
            }
          });
    } else if (formats.contains(AttributeFormat.Enum)) {
      ComboboxWithBrowseButton editor =
          new ComboboxWithBrowseButton(SystemInfo.isWindows ? new MyComboBox() : new JComboBox()) {
            @Override
            public Dimension getPreferredSize() {
              return getComponentPreferredSize();
            }
          };

      final JComboBox comboBox = editor.getComboBox();
      DefaultComboBoxModel model = new DefaultComboBoxModel(values);
      model.insertElementAt(StringsComboEditor.UNSET, 0);
      comboBox.setModel(model);
      comboBox.setEditable(true);
      ComboEditor.installListeners(
          comboBox,
          new ComboEditor.ComboEditorListener(this) {
            @Override
            protected void onValueChosen() {
              if (comboBox.getSelectedItem() == StringsComboEditor.UNSET) {
                comboBox.setSelectedItem(null);
              }
              super.onValueChosen();
            }
          });
      myEditor = editor;
      comboBox.setSelectedIndex(0);
    } else {
      myEditor =
          new TextFieldWithBrowseButton() {
            @Override
            protected void installPathCompletion(
                FileChooserDescriptor fileChooserDescriptor, @Nullable Disposable parent) {}

            @Override
            public Dimension getPreferredSize() {
              return getComponentPreferredSize();
            }
          };
      myEditor.registerKeyboardAction(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {}
          },
          KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0),
          JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);

      JTextField textField = getComboText();
      textField.addActionListener(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
              fireValueCommitted(false, true);
            }
          });
      textField
          .getDocument()
          .addDocumentListener(
              new DocumentAdapter() {
                @Override
                protected void textChanged(final DocumentEvent e) {
                  preferredSizeChanged();
                }
              });
      selectTextOnFocusGain(textField);
    }

    if (myCheckBox == null) {
      myEditor.registerKeyboardAction(
          new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {}
          },
          KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0),
          JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
    }

    myEditor.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent e) {
            showDialog();
          }
        });
    myEditor.addFocusListener(
        new FocusAdapter() {
          @Override
          public void focusGained(FocusEvent e) {
            myEditor.getChildComponent().requestFocus();
          }
        });
  }
 /**
  * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
  * call it in your code!
  *
  * @noinspection ALL
  */
 private void $$$setupUI$$$() {
   contentPane = new JPanel();
   contentPane.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));
   contentPane.setMinimumSize(new Dimension(350, 280));
   contentPane.setPreferredSize(new Dimension(350, 280));
   final JPanel panel1 = new JPanel();
   panel1.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
   contentPane.add(
       panel1,
       new GridConstraints(
           1,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           1,
           null,
           null,
           null,
           0,
           false));
   final Spacer spacer1 = new Spacer();
   panel1.add(
       spacer1,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           1,
           null,
           null,
           null,
           0,
           false));
   final JPanel panel2 = new JPanel();
   panel2.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));
   panel1.add(
       panel2,
       new GridConstraints(
           0,
           1,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   buttonOK = new JButton();
   buttonOK.setText("OK");
   panel2.add(
       buttonOK,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   buttonCancel = new JButton();
   buttonCancel.setText("Cancelar");
   panel2.add(
       buttonCancel,
       new GridConstraints(
           0,
           1,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JPanel panel3 = new JPanel();
   panel3.setLayout(new GridLayoutManager(7, 2, new Insets(0, 0, 0, 0), -1, -1));
   contentPane.add(
       panel3,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   final JLabel label1 = new JLabel();
   label1.setText("Nome");
   panel3.add(
       label1,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final Spacer spacer2 = new Spacer();
   panel3.add(
       spacer2,
       new GridConstraints(
           6,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_VERTICAL,
           1,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           null,
           null,
           null,
           0,
           false));
   txtNome = new JTextField();
   panel3.add(
       txtNome,
       new GridConstraints(
           0,
           1,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           new Dimension(150, -1),
           null,
           0,
           false));
   final JLabel label2 = new JLabel();
   label2.setText("CPF");
   panel3.add(
       label2,
       new GridConstraints(
           1,
           0,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   txtCpf = new JTextField();
   panel3.add(
       txtCpf,
       new GridConstraints(
           1,
           1,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           new Dimension(150, -1),
           null,
           0,
           false));
   final JLabel label3 = new JLabel();
   label3.setText("Endereco");
   panel3.add(
       label3,
       new GridConstraints(
           2,
           0,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   txtEndereco = new JTextField();
   panel3.add(
       txtEndereco,
       new GridConstraints(
           2,
           1,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           new Dimension(150, -1),
           null,
           0,
           false));
   final JLabel label4 = new JLabel();
   label4.setText("Telefone");
   panel3.add(
       label4,
       new GridConstraints(
           3,
           0,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label5 = new JLabel();
   label5.setText("Status");
   panel3.add(
       label5,
       new GridConstraints(
           5,
           0,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   cboxStatusCliente = new JComboBox();
   final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();
   defaultComboBoxModel1.addElement("Inativo");
   defaultComboBoxModel1.addElement("Ativo");
   cboxStatusCliente.setModel(defaultComboBoxModel1);
   panel3.add(
       cboxStatusCliente,
       new GridConstraints(
           5,
           1,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label6 = new JLabel();
   label6.setText("E-mail");
   panel3.add(
       label6,
       new GridConstraints(
           4,
           0,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   txtEmail = new JTextField();
   panel3.add(
       txtEmail,
       new GridConstraints(
           4,
           1,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           new Dimension(150, -1),
           null,
           0,
           false));
   txtTelefone = new JTextField();
   panel3.add(
       txtTelefone,
       new GridConstraints(
           3,
           1,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           new Dimension(150, -1),
           null,
           0,
           false));
 }
Esempio n. 8
0
 /**
  * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
  * call it in your code!
  *
  * @noinspection ALL
  */
 private void $$$setupUI$$$() {
   contentPane = new JPanel();
   contentPane.setLayout(
       new com.intellij.uiDesigner.core.GridLayoutManager(
           2, 1, new Insets(10, 10, 10, 10), -1, -1));
   final JPanel panel1 = new JPanel();
   panel1.setLayout(
       new com.intellij.uiDesigner.core.GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));
   contentPane.add(
       panel1,
       new com.intellij.uiDesigner.core.GridConstraints(
           1,
           0,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER,
           com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK
               | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW,
           1,
           null,
           null,
           null,
           0,
           false));
   final com.intellij.uiDesigner.core.Spacer spacer1 = new com.intellij.uiDesigner.core.Spacer();
   panel1.add(
       spacer1,
       new com.intellij.uiDesigner.core.GridConstraints(
           0,
           0,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER,
           com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW,
           1,
           null,
           null,
           null,
           0,
           false));
   final JPanel panel2 = new JPanel();
   panel2.setLayout(
       new com.intellij.uiDesigner.core.GridLayoutManager(
           1, 2, new Insets(0, 0, 0, 0), -1, -1, true, false));
   panel1.add(
       panel2,
       new com.intellij.uiDesigner.core.GridConstraints(
           0,
           1,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER,
           com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK
               | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK
               | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   buttonOK = new JButton();
   buttonOK.setText("OK");
   panel2.add(
       buttonOK,
       new com.intellij.uiDesigner.core.GridConstraints(
           0,
           0,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER,
           com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK
               | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   buttonCancel = new JButton();
   buttonCancel.setText("Cancel");
   panel2.add(
       buttonCancel,
       new com.intellij.uiDesigner.core.GridConstraints(
           0,
           1,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER,
           com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK
               | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JPanel panel3 = new JPanel();
   panel3.setLayout(
       new com.intellij.uiDesigner.core.GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));
   contentPane.add(
       panel3,
       new com.intellij.uiDesigner.core.GridConstraints(
           0,
           0,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_CENTER,
           com.intellij.uiDesigner.core.GridConstraints.FILL_BOTH,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK
               | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_SHRINK
               | com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   spinnerTamanyHidato = new JSpinner();
   panel3.add(
       spinnerTamanyHidato,
       new com.intellij.uiDesigner.core.GridConstraints(
           0,
           0,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST,
           com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   spinnerForats = new JSpinner();
   panel3.add(
       spinnerForats,
       new com.intellij.uiDesigner.core.GridConstraints(
           1,
           0,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST,
           com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   spinnerNumerosPrecolocats = new JSpinner();
   panel3.add(
       spinnerNumerosPrecolocats,
       new com.intellij.uiDesigner.core.GridConstraints(
           2,
           0,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST,
           com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_WANT_GROW,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label1 = new JLabel();
   label1.setText("Tamany de l'Hidato");
   panel3.add(
       label1,
       new com.intellij.uiDesigner.core.GridConstraints(
           0,
           1,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST,
           com.intellij.uiDesigner.core.GridConstraints.FILL_NONE,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label2 = new JLabel();
   label2.setText("\"Forats\" o caselles no usables");
   panel3.add(
       label2,
       new com.intellij.uiDesigner.core.GridConstraints(
           1,
           1,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST,
           com.intellij.uiDesigner.core.GridConstraints.FILL_NONE,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label3 = new JLabel();
   label3.setText("Numeros pre-colocats");
   panel3.add(
       label3,
       new com.intellij.uiDesigner.core.GridConstraints(
           2,
           1,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST,
           com.intellij.uiDesigner.core.GridConstraints.FILL_NONE,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   comboBoxDificultat = new JComboBox();
   final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();
   defaultComboBoxModel1.addElement("Fàcil");
   defaultComboBoxModel1.addElement("Normal");
   defaultComboBoxModel1.addElement("Difícil");
   comboBoxDificultat.setModel(defaultComboBoxModel1);
   panel3.add(
       comboBoxDificultat,
       new com.intellij.uiDesigner.core.GridConstraints(
           3,
           0,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST,
           com.intellij.uiDesigner.core.GridConstraints.FILL_HORIZONTAL,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_CAN_GROW,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label4 = new JLabel();
   label4.setText("Dificultat");
   panel3.add(
       label4,
       new com.intellij.uiDesigner.core.GridConstraints(
           3,
           1,
           1,
           1,
           com.intellij.uiDesigner.core.GridConstraints.ANCHOR_WEST,
           com.intellij.uiDesigner.core.GridConstraints.FILL_NONE,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           com.intellij.uiDesigner.core.GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
 }
 /**
  * Method generated by IntelliJ IDEA GUI Designer >>> IMPORTANT!! <<< DO NOT edit this method OR
  * call it in your code!
  *
  * @noinspection ALL
  */
 private void $$$setupUI$$$() {
   contentPane = new JPanel();
   contentPane.setLayout(new GridLayoutManager(4, 1, new Insets(10, 10, 10, 10), -1, -1));
   final JPanel panel1 = new JPanel();
   panel1.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
   contentPane.add(
       panel1,
       new GridConstraints(
           3,
           0,
           1,
           1,
           GridConstraints.ANCHOR_SOUTH,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           1,
           null,
           null,
           null,
           0,
           false));
   final JPanel panel2 = new JPanel();
   panel2.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
   panel1.add(
       panel2,
       new GridConstraints(
           1,
           0,
           1,
           1,
           GridConstraints.ANCHOR_EAST,
           GridConstraints.FILL_VERTICAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   btImport = new JButton();
   btImport.setText("Import");
   panel2.add(
       btImport,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   btCancel = new JButton();
   btCancel.setEnabled(false);
   btCancel.setText("Cancel");
   panel2.add(
       btCancel,
       new GridConstraints(
           0,
           1,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   btClose = new JButton();
   btClose.setText("Close");
   panel2.add(
       btClose,
       new GridConstraints(
           0,
           2,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JSeparator separator1 = new JSeparator();
   panel1.add(
       separator1,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_NORTH,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           null,
           null,
           null,
           0,
           false));
   final JPanel panel3 = new JPanel();
   panel3.setLayout(new GridLayoutManager(4, 4, new Insets(0, 0, 0, 0), -1, -1));
   contentPane.add(
       panel3,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   final JLabel label1 = new JLabel();
   label1.setText("File path:");
   panel3.add(
       label1,
       new GridConstraints(
           1,
           0,
           1,
           1,
           GridConstraints.ANCHOR_EAST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   tfFilePath = new JTextField();
   panel3.add(
       tfFilePath,
       new GridConstraints(
           1,
           1,
           1,
           2,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           new Dimension(150, -1),
           null,
           0,
           false));
   btBrowse = new JButton();
   btBrowse.setText("Browse");
   panel3.add(
       btBrowse,
       new GridConstraints(
           1,
           3,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label2 = new JLabel();
   label2.setText("Delimiter:");
   panel3.add(
       label2,
       new GridConstraints(
           2,
           0,
           1,
           1,
           GridConstraints.ANCHOR_EAST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   cmbDelimiter = new JComboBox();
   cmbDelimiter.setEditable(true);
   final DefaultComboBoxModel defaultComboBoxModel1 = new DefaultComboBoxModel();
   defaultComboBoxModel1.addElement(",");
   defaultComboBoxModel1.addElement("|");
   defaultComboBoxModel1.addElement("-");
   defaultComboBoxModel1.addElement(":");
   cmbDelimiter.setModel(defaultComboBoxModel1);
   panel3.add(
       cmbDelimiter,
       new GridConstraints(
           2,
           1,
           1,
           2,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label3 = new JLabel();
   label3.setText("Table name:");
   panel3.add(
       label3,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_EAST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   tfTableName = new JTextField();
   panel3.add(
       tfTableName,
       new GridConstraints(
           0,
           1,
           1,
           2,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           new Dimension(150, -1),
           null,
           0,
           false));
   final JPanel panel4 = new JPanel();
   panel4.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));
   panel3.add(
       panel4,
       new GridConstraints(
           3,
           0,
           1,
           4,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   final JPanel panel5 = new JPanel();
   panel5.setLayout(new GridLayoutManager(2, 4, new Insets(0, 0, 0, 0), -1, -1));
   panel4.add(
       panel5,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   final JLabel label4 = new JLabel();
   label4.setText("Select types for columns:");
   panel5.add(
       label4,
       new GridConstraints(
           1,
           0,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final Spacer spacer1 = new Spacer();
   panel5.add(
       spacer1,
       new GridConstraints(
           1,
           1,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           1,
           null,
           null,
           null,
           0,
           false));
   btRemoveColumn = new JButton();
   btRemoveColumn.setEnabled(false);
   btRemoveColumn.setText("Remove");
   panel5.add(
       btRemoveColumn,
       new GridConstraints(
           1,
           3,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   btAddColumn = new JButton();
   btAddColumn.setText("Add...");
   panel5.add(
       btAddColumn,
       new GridConstraints(
           1,
           2,
           1,
           1,
           GridConstraints.ANCHOR_EAST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JSeparator separator2 = new JSeparator();
   panel5.add(
       separator2,
       new GridConstraints(
           0,
           0,
           1,
           4,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           null,
           null,
           null,
           0,
           false));
   final JScrollPane scrollPane1 = new JScrollPane();
   panel4.add(
       scrollPane1,
       new GridConstraints(
           1,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW,
           null,
           new Dimension(400, 200),
           null,
           0,
           false));
   rowsTable = new JTable();
   scrollPane1.setViewportView(rowsTable);
   final JLabel label5 = new JLabel();
   label5.setFont(new Font(label5.getFont().getName(), Font.BOLD, label5.getFont().getSize()));
   label5.setText("* Note: data for not listed columns will be treated as of String type.");
   panel4.add(
       label5,
       new GridConstraints(
           2,
           0,
           1,
           1,
           GridConstraints.ANCHOR_SOUTHWEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JSeparator separator3 = new JSeparator();
   contentPane.add(
       separator3,
       new GridConstraints(
           1,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           null,
           null,
           null,
           0,
           false));
   final JPanel panel6 = new JPanel();
   panel6.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));
   contentPane.add(
       panel6,
       new GridConstraints(
           2,
           0,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_BOTH,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
           null,
           null,
           null,
           0,
           false));
   final JLabel label6 = new JLabel();
   label6.setText("Written rows:");
   panel6.add(
       label6,
       new GridConstraints(
           1,
           0,
           1,
           1,
           GridConstraints.ANCHOR_EAST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final Spacer spacer2 = new Spacer();
   panel6.add(
       spacer2,
       new GridConstraints(
           1,
           2,
           1,
           1,
           GridConstraints.ANCHOR_CENTER,
           GridConstraints.FILL_HORIZONTAL,
           GridConstraints.SIZEPOLICY_WANT_GROW,
           1,
           null,
           null,
           null,
           0,
           false));
   writtenRowsCount = new JLabel();
   writtenRowsCount.setText("?");
   panel6.add(
       writtenRowsCount,
       new GridConstraints(
           1,
           1,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   final JLabel label7 = new JLabel();
   label7.setText("Read rows:");
   panel6.add(
       label7,
       new GridConstraints(
           0,
           0,
           1,
           1,
           GridConstraints.ANCHOR_EAST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
   readRowsCount = new JLabel();
   readRowsCount.setText("?");
   panel6.add(
       readRowsCount,
       new GridConstraints(
           0,
           1,
           1,
           1,
           GridConstraints.ANCHOR_WEST,
           GridConstraints.FILL_NONE,
           GridConstraints.SIZEPOLICY_FIXED,
           GridConstraints.SIZEPOLICY_FIXED,
           null,
           null,
           null,
           0,
           false));
 }