Пример #1
0
  /** Create the panel. */
  public DictionaryPane() {
    setLayout(new BorderLayout(0, 0));

    JPanel panel = new JPanel();
    add(panel, BorderLayout.SOUTH);
    panel.setLayout(new BorderLayout(0, 0));

    JPanel panel_1 = new JPanel();
    FlowLayout flowLayout = (FlowLayout) panel_1.getLayout();
    flowLayout.setAlignment(FlowLayout.LEADING);
    panel.add(panel_1, BorderLayout.CENTER);

    JButton btnNewButton = new JButton("Add word");
    panel_1.add(btnNewButton);

    JButton btnRemoveWord = new JButton("Remove word");
    panel_1.add(btnRemoveWord);

    JPanel panel_2 = new JPanel();
    FlowLayout flowLayout_1 = (FlowLayout) panel_2.getLayout();
    flowLayout_1.setAlignment(FlowLayout.TRAILING);
    panel.add(panel_2, BorderLayout.EAST);

    JButton btnNewButton_1 = new JButton("Save");
    panel_2.add(btnNewButton_1);

    JPanel panel_3 = new JPanel();
    panel_3.setBorder(new EmptyBorder(5, 5, 0, 5));
    add(panel_3, BorderLayout.CENTER);
    panel_3.setLayout(new BorderLayout(0, 0));

    list = new JList<String>();
    panel_3.add(list);
  }
Пример #2
0
  /** コンストラクタ �?��ンポ�?ネント�?期化 */
  public LoungeFrame() {
    super("Lounge");

    setBounds(100, 100, 320, 500);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

    JPanel topPanel = new JPanel();
    FlowLayout fl = new FlowLayout();
    fl.setAlignment(FlowLayout.LEFT);
    topPanel.setLayout(fl);
    topPanel.setPreferredSize(new Dimension(40, 40));

    joinBtn = new JButton("参加");
    joinBtn.setPreferredSize(new Dimension(60, 25));
    joinBtn.addActionListener(new JoinListener());
    topPanel.add(joinBtn);

    ceaseBtn = new JButton("退室");
    ceaseBtn.setPreferredSize(new Dimension(60, 25));
    ceaseBtn.addActionListener(new CeaseListener());
    ceaseBtn.setEnabled(false);
    topPanel.add(ceaseBtn);

    startBtn = new JButton("開始");
    startBtn.setPreferredSize(new Dimension(60, 25));
    startBtn.addActionListener(new StartListener());
    startBtn.setEnabled(false);
    topPanel.add(startBtn);

    JPanel mainPanel = new JPanel();
    FlowLayout fl2 = new FlowLayout();
    fl2.setAlignment(FlowLayout.CENTER);
    mainPanel.setLayout(fl2);
    mainPanel.setPreferredSize(new Dimension(400, 400));

    visitorPanel = new JScrollPane();
    visitorPanel.setPreferredSize(new Dimension(150, 300));
    mainPanel.add(visitorPanel);

    playerPanel = new JScrollPane();
    playerPanel.setPreferredSize(new Dimension(150, 300));
    mainPanel.add(playerPanel);

    add(topPanel, BorderLayout.NORTH);
    add(mainPanel, BorderLayout.CENTER);

    setVisible(true);
  }
 private void jbInit() throws Exception {
   border1 = BorderFactory.createEmptyBorder(20, 20, 20, 20);
   contentPane.setBorder(border1);
   contentPane.setLayout(borderLayout1);
   controlsPane.setLayout(gridLayout1);
   gridLayout1.setColumns(1);
   gridLayout1.setHgap(10);
   gridLayout1.setRows(0);
   gridLayout1.setVgap(10);
   okButton.setVerifyInputWhenFocusTarget(true);
   okButton.setMnemonic('O');
   okButton.setText("OK");
   buttonsPane.setLayout(flowLayout1);
   flowLayout1.setAlignment(FlowLayout.CENTER);
   messagePane.setEditable(false);
   messagePane.setText("");
   borderLayout1.setHgap(10);
   borderLayout1.setVgap(10);
   this.setTitle("Subscription Authorization");
   this.getContentPane().add(contentPane, BorderLayout.CENTER);
   contentPane.add(controlsPane, BorderLayout.SOUTH);
   controlsPane.add(responsesComboBox, null);
   controlsPane.add(buttonsPane, null);
   buttonsPane.add(okButton, null);
   contentPane.add(messageScrollPane, BorderLayout.CENTER);
   messageScrollPane.getViewport().add(messagePane, null);
 }
Пример #4
0
  public void initializeGUIComponents() {

    // Setup Data Panel
    editButton = new JButton("Edit");
    editButton.addActionListener(buttonController);
    JPanel buttonPanel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) buttonPanel.getLayout();
    flowLayout.setAlignment(FlowLayout.RIGHT);
    buttonPanel.add(editButton);
    buttonPanel.add(Box.createHorizontalStrut(10));

    // Setup the Main Panel.
    setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Skills"));
    setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

    // Setup TextField
    scrollPane = new JScrollPane();
    taSkills = new JTextArea();
    taSkills.setLineWrap(true);
    taSkills.setWrapStyleWord(true);
    taSkills.setEditable(false);
    scrollPane.setViewportView(taSkills);

    add(scrollPane);
    add(buttonPanel);
  }
Пример #5
0
  public TasksPanelBase() {
    setLayout(new BorderLayout(0, 0));

    panel = new JPanel();
    panel.setBorder(
        new TitledBorder(null, "Tasks", TitledBorder.LEADING, TitledBorder.TOP, null, null));
    add(panel, BorderLayout.CENTER);
    panel.setOpaque(false);
    panel.setLayout(new BorderLayout(0, 0));

    scrollPane = new JScrollPane();
    scrollPane.setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
    panel.add(scrollPane, BorderLayout.CENTER);

    taskList = new JList();
    taskList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    taskList.setCellRenderer(new TaskListRenderer());
    scrollPane.setViewportView(taskList);

    buttonPanel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) buttonPanel.getLayout();
    flowLayout.setVgap(0);
    flowLayout.setHgap(0);
    flowLayout.setAlignment(FlowLayout.RIGHT);
    panel.add(buttonPanel, BorderLayout.SOUTH);

    deleteButton = new JButton("");
    deleteButton.setActionCommand("delete");
    deleteButton.setIcon(
        new ImageIcon(TasksPanelBase.class.getResource("/resources/icons/delete.png")));
    buttonPanel.add(deleteButton);
  }
Пример #6
0
  /** Creates the ui. */
  private void createUI() {
    JPanel panel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) panel.getLayout();
    flowLayout.setAlignment(FlowLayout.TRAILING);
    getContentPane().add(panel, BorderLayout.SOUTH);

    JButton btnOk = new JButton(Localisation.getString(ExpressionPanelv2.class, "common.ok"));
    btnOk.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            okButtonPressed = true;

            setVisible(false);
          }
        });
    panel.add(btnOk);

    JButton btnCancel =
        new JButton(Localisation.getString(ExpressionPanelv2.class, "common.cancel"));
    btnCancel.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            okButtonPressed = false;

            setVisible(false);
          }
        });
    panel.add(btnCancel);
  }
Пример #7
0
  protected void addCmdButton() {
    FlowLayout fl = new FlowLayout();
    fl.setAlignment(FlowLayout.RIGHT);
    buttonPanel.setLayout(fl);

    buttonPanel.add(bOk);
    buttonPanel.add(bExit);
  }
Пример #8
0
 public JCheckBox buildCheckBox(String label, boolean selected) {
   FlowLayout f = new FlowLayout();
   f.setAlignment(FlowLayout.LEFT);
   JPanel checkPanel = new JPanel(f);
   JCheckBox checkBox = new JCheckBox(label);
   checkBox.setSelected(selected);
   checkPanel.add(checkBox);
   return checkBox;
 }
Пример #9
0
 public JRadioButton buildRadioButton(String label, boolean selected) {
   FlowLayout f = new FlowLayout();
   f.setAlignment(FlowLayout.LEFT);
   JPanel radioPanel = new JPanel(f);
   JRadioButton radioButton = new JRadioButton(label);
   radioButton.setSelected(selected);
   radioPanel.add(radioButton);
   return radioButton;
 }
Пример #10
0
  public LicenseDialog(Component parent) {
    setTitle("Licensing information");

    pnlButtons.add(bttnOk);

    cbLang.addItem("English");
    cbLang.addItem("Eesti");

    FlowLayout fl = new FlowLayout();
    fl.setAlignment(FlowLayout.LEFT);

    pnlHeader.setLayout(fl);

    pnlHeader.add(lblLang);
    pnlHeader.add(cbLang);

    pnlMain.setLayout(new BorderLayout());
    pnlMain.add(pnlHeader, BorderLayout.NORTH);
    pnlMain.add(scrollPane, BorderLayout.CENTER);
    pnlMain.add(pnlButtons, BorderLayout.SOUTH);

    taLicenseText.setText(getLicenseText());
    taLicenseText.setCaretPosition(0);
    taLicenseText.setLineWrap(true);
    taLicenseText.setEditable(false);
    taLicenseText.setWrapStyleWord(true);

    getContentPane().add(pnlMain);
    setPreferredSize(new Dimension(500, 600));
    setLocationRelativeTo(parent);

    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

    bttnOk.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            if (evt.getSource() == bttnOk) {
              dispose();
            }
          } // end actionPerformed
        }); // end bttnOk Action Listener

    cbLang.addItemListener(
        new ItemListener() {
          public void itemStateChanged(final ItemEvent event) {
            if (event.getSource() == cbLang
                && event.getStateChange() == ItemEvent.SELECTED
                && cbLang.getItemCount() > 0) {
              taLicenseText.setText(getLicenseText());
              taLicenseText.setCaretPosition(0);
            }
          }
        }); // end cbLang item listener

    pack();
    setVisible(true);
  } // PortPropertiesDialog
Пример #11
0
  private JPanel getContainer() {
    layout = new FlowLayout(); // Instanciation du layout
    layout.setAlignment(FlowLayout.CENTER); // On centre les composants

    container = new JPanel(); // On cr�e notre objet
    container.setLayout(layout); // On applique le layout

    textCycle.setEditable(false);
    textCycle.setPreferredSize(new Dimension(600, 200));
    for (int k = 0; k < cycles.size(); k++) {
      textCycle.setText(
          textCycle.getText()
              + "Cycle no"
              + k
              + " :"
              + cycles.get(k).toString()
              + "\n"
              + "\n"); // On lui donne un texte
      container.add(textCycle); // On l'ajoute au container
    }

    btnPath = new JButton(); // Cr�ation du bouton
    btnPath.setPreferredSize(new Dimension(200, 25)); // On lui donne une taille
    btnPath.setText("Show path"); // On lui donne un texte
    btnPath.addActionListener(this); // On ajoute la fen�tre en tant qu'�couteur du bouton
    container.add(btnPath); // On l'ajoute � la fen�tre

    oneState =
        new JComboBox(listOneState); // On cr�e la liste en lui donnant un tableau d'op�rateurs
    oneState.setPreferredSize(new Dimension(140, 25)); // On lui donne une taille
    container.add(oneState); // on l'ajoute � la fen�tre

    twoStates =
        new JComboBox(listTwoStates); // On cr�e la liste en lui donnant un tableau d'op�rateurs
    twoStates.setPreferredSize(new Dimension(140, 25)); // On lui donne une taille
    container.add(twoStates); // on l'ajoute � la fen�tre

    btnCycle = new JButton(); // Cr�ation du bouton
    btnCycle.setPreferredSize(new Dimension(300, 25)); // On lui donne une taille
    btnCycle.setText("Show cycle"); // On lui donne un texte
    btnCycle.addActionListener(this); // On ajoute la fen�tre en tant qu'�couteur du bouton
    container.add(btnCycle); // On l'ajoute � la fen�tre

    cyclesBox =
        new JComboBox(listCycles); // On cr�e la liste en lui donnant un tableau d'op�rateurs
    cyclesBox.setPreferredSize(new Dimension(120, 25)); // On lui donne une taille
    container.add(cyclesBox); // on l'ajoute � la fen�tre

    btnReset = new JButton(); // Cr�ation du bouton
    btnReset.setPreferredSize(new Dimension(400, 25)); // On lui donne une taille
    btnReset.setText("Clear"); // On lui donne un texte
    btnReset.addActionListener(this); // On ajoute la fen�tre en tant qu'�couteur du bouton
    container.add(btnReset); // On l'ajoute � la fen�tre

    return container;
  }
Пример #12
0
 public JTextField buildField(String labelText, String initText) {
   FlowLayout f = new FlowLayout();
   f.setAlignment(FlowLayout.LEFT);
   JPanel panel = new JPanel(f);
   JLabel label = new JLabel(labelText);
   JTextField text = new JTextField(initText);
   text.setColumns(8);
   panel.add(label);
   panel.add(text);
   return text;
 }
Пример #13
0
 /**
  * This method initializes resultInitialPanel1
  *
  * @return javax.swing.JPanel
  */
 private JPanel getResultInitialPanel1() {
   if (resultInitialPanel1 == null) {
     FlowLayout flowLayout = new FlowLayout();
     flowLayout.setAlignment(FlowLayout.LEFT);
     resultInitialPanel1 = new JPanel();
     resultInitialPanel1.setLayout(flowLayout);
     resultInitialPanel1.setName("resultInitialPanel1");
     resultInitialPanel1.setBackground(WINDOW_BACKGROUND_COLOR);
   }
   return resultInitialPanel1;
 }
Пример #14
0
 /**
  * This method initializes panelResultados
  *
  * @return javax.swing.JPanel
  */
 JPanel getPanelResultados() {
   if (panelResultados == null) {
     FlowLayout flowLayout = new FlowLayout();
     flowLayout.setAlignment(java.awt.FlowLayout.LEFT);
     flowLayout.setVgap(10);
     flowLayout.setHgap(10);
     panelResultados = new JPanel();
     panelResultados.setLayout(flowLayout);
   }
   return panelResultados;
 }
Пример #15
0
 /**
  * This method initializes jLabel
  *
  * @return javax.swing.JLabel
  */
 private JPanel getStatusPanel() {
   if (statusPanel == null) {
     FlowLayout flowLayout = new FlowLayout();
     flowLayout.setAlignment(FlowLayout.LEFT);
     statusPanel = new JPanel();
     statusPanel.setLayout(flowLayout);
     statusPanel.add(getNumLineLabel(), null);
     statusPanel.add(new JSeparator(SwingConstants.VERTICAL), null);
     statusPanel.add(getStatusLabel(), null);
   }
   return statusPanel;
 }
Пример #16
0
 /**
  * Constructs a toolbar with the given name.
  *
  * <p>The name is used when reading/writing XML configuration. It must not be null if you use this
  * feature.
  */
 public WtoolBar(String barName, TYPE type) {
   FlowLayout flowLayout = (FlowLayout) getLayout();
   flowLayout.setVgap(0);
   flowLayout.setHgap(0);
   flowLayout.setAlignment(FlowLayout.LEADING);
   this.barName = barName;
   this.type = type;
   this.setAlignmentX(LEFT_ALIGNMENT);
   this.setAlignmentY(TOP_ALIGNMENT);
   setOpaque(false);
   addSeparator(SEPARATOR_2x24);
 }
Пример #17
0
  private void initTopPanel() {
    _topPanel = new JPanel();
    FlowLayout fl__topPanel = (FlowLayout) _topPanel.getLayout();
    fl__topPanel.setHgap(0);
    fl__topPanel.setVgap(0);
    fl__topPanel.setAlignment(FlowLayout.LEFT);
    add(_topPanel, BorderLayout.NORTH);

    _lblRunParamaters = new JLabel("Neural Network Training - Run Parameters");
    _lblRunParamaters.setVerticalAlignment(SwingConstants.TOP);
    _topPanel.add(_lblRunParamaters);
  }
 /* WARNING: THIS METHOD WILL BE REGENERATED. */
 private java.awt.FlowLayout getPanel1FlowLayout() {
   java.awt.FlowLayout ivjPanel1FlowLayout = null;
   try {
     /* Create part */
     ivjPanel1FlowLayout = new java.awt.FlowLayout();
     ivjPanel1FlowLayout.setAlignment(java.awt.FlowLayout.RIGHT);
   } catch (java.lang.Throwable ivjExc) {
     handleException(ivjExc);
   }
   ;
   return ivjPanel1FlowLayout;
 }
Пример #19
0
  /** Inits the dialog. */
  @Override
  protected void initDialog() {
    /* align buttons to the right */
    final FlowLayout layout = new FlowLayout();
    layout.setAlignment(FlowLayout.RIGHT);

    if (buttonClass(cancelButton()) != null) {
      buttonClass(cancelButton()).getParent().setLayout(layout);
    }

    /* disable back button if there is no previous dialog */
    if (previousDialog == null && buttonClass(backButton()) != null) {
      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              buttonClass(backButton()).setEnabled(false);
            }
          });
    }

    /* disable next and finish buttons */
    if (buttonClass(nextButton()) != null) {
      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              buttonClass(nextButton()).setEnabled(false);
            }
          });
    }
    if (buttonClass(finishButton()) != null) {
      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              buttonClass(finishButton()).setEnabled(false);
            }
          });
    }
    if (buttonClass(retryButton()) != null) {
      SwingUtilities.invokeLater(
          new Runnable() {
            @Override
            public void run() {
              buttonClass(retryButton()).setVisible(false);
              buttonClass(retryButton()).setBackgroundColor(Color.RED);
            }
          });
    }
    disableComponents();
  }
Пример #20
0
 /**
  * This method initializes resultProgressPanel4
  *
  * @return javax.swing.JPanel
  */
 private JPanel getResultProgressPanel4() {
   if (resultProgressPanel4 == null) {
     FlowLayout flowLayout = new FlowLayout();
     flowLayout.setAlignment(FlowLayout.LEFT);
     flowLayout.setHgap(0);
     resultProgressPanel4 = new JPanel();
     resultProgressPanel4.setLayout(flowLayout);
     resultProgressPanel4.setName("resultInProgressPanel4");
     resultProgressPanel4.setBackground(WINDOW_BACKGROUND_COLOR);
     resultProgressPanel4.add(getResultProgressBar4(), null);
   }
   return resultProgressPanel4;
 }
Пример #21
0
  private void initBottomPanel() {
    _bottomPanel = new JPanel();
    FlowLayout flowLayout = (FlowLayout) _bottomPanel.getLayout();
    flowLayout.setVgap(0);
    flowLayout.setHgap(0);
    flowLayout.setAlignment(FlowLayout.LEFT);
    add(_bottomPanel, BorderLayout.SOUTH);

    _lblDefSSE = new JLabel("SSE* = Sum of Squared Error");
    _lblDefSSE.setHorizontalAlignment(SwingConstants.LEFT);
    _lblDefSSE.setVerticalAlignment(SwingConstants.TOP);
    _bottomPanel.add(_lblDefSSE);
  }
Пример #22
0
 /**
  * This method initializes panelStatus
  *
  * @return javax.swing.JPanel
  */
 private JPanel getPanelStatus() {
   if (panelStatus == null) {
     FlowLayout flowLayout1 = new FlowLayout();
     flowLayout1.setAlignment(java.awt.FlowLayout.LEFT);
     flowLayout1.setVgap(0);
     flowLayout1.setHgap(0);
     panelStatus = new JPanel();
     panelStatus.setLayout(flowLayout1);
     panelStatus.setPreferredSize(new Dimension(5, 25));
     panelStatus.add(getPanelServidorStatus(), null);
   }
   return panelStatus;
 }
Пример #23
0
  /**
   * Descripción de Método
   *
   * @throws Exception
   */
  private void jbInit() throws Exception {
    this.setLayout(mainLayout);
    this.add(splitPane, BorderLayout.CENTER);
    splitPane.setOpaque(false);
    graphPanel.setLayout(graphLayout);

    //

    splitPane.add(graphPanel, JSplitPane.LEFT);
    splitPane.add(cardPanel, JSplitPane.RIGHT);
    splitPane.setBorder(null);
    splitPane.setName("gc_splitPane");

    //

    cardPanel.setLayout(cardLayout);
    cardPanel.add(srPane, "srPane"); // Sequence Important!
    cardPanel.add(mrPane, "mrPane");
    cardPanel.setBorder(null);
    cardPanel.setName("gc_cardPanel");

    // single row (w/o xPane it would be centered)

    srPane.setBorder(null);
    srPane.setName("gc_srPane");
    srPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    srPane.add(vPane, JSplitPane.TOP);
    srPane.setTopComponent(vPane);
    vPane.getViewport().add(xPanel, null);
    xPanel.add(vPanel);
    vPane.setBorder(null);
    xPanel.setLayout(xLayout);
    xPanel.setName("gc_xPanel");
    xLayout.setAlignment(FlowLayout.LEFT);
    xLayout.setHgap(0);
    xLayout.setVgap(0);

    // multi-row

    mrPane.setBorder(null);
    mrPane.getViewport().add(vTable, null);
    mrPane.setName("gc_mrPane");

    //

    graphPanel.setBorder(null);
    graphPanel.setName("gc_graphPanel");
    srPane.setDividerLocation(200);
  } // jbInit
Пример #24
0
 private void init() {
   FlowLayout fo = new FlowLayout();
   this.setLayout(fo);
   fo.setAlignment(FlowLayout.LEFT);
   iconLabel = new JLabel();
   displayNameField = new JLabel(this.mart.getDisplayName());
   this.add(iconLabel);
   this.add(displayNameField);
   this.refreshIcon();
   this.addMouseListener(this);
   DragSource ds = new DragSource();
   ds.createDefaultDragGestureRecognizer(this, DnDConstants.ACTION_COPY, this);
   this.setBorder(BorderFactory.createLineBorder(this.getBackground()));
   this.setOpaque(true);
 }
Пример #25
0
  /**
   * This method initializes fJPanelprefix
   *
   * @return javax.swing.JPanel
   */
  protected javax.swing.JPanel getJPanelprefix() {
    if (fJPanelprefix == null) {
      try {
        fJPanelprefix = new javax.swing.JPanel(); // Generated

        java.awt.FlowLayout layFlowLayout = new java.awt.FlowLayout(); // Generated
        layFlowLayout.setAlignment(java.awt.FlowLayout.RIGHT); // Generated
        fJPanelprefix.setLayout(layFlowLayout); // Generated
        fJPanelprefix.add(getJLabelprefix(), null); // Generated
        fJPanelprefix.add(getStringTextFieldprefix(), null); // Generated
      } catch (java.lang.Throwable e) {
        e.printStackTrace();
      }
    }
    return fJPanelprefix;
  }
Пример #26
0
  private void jbInit() throws Exception {
    setTitle("users");
    buttonsPanel.setLayout(flowLayout1);
    flowLayout1.setAlignment(FlowLayout.LEFT);
    this.setSize(new Dimension(500, 300));
    grid.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    grid.setDeleteButton(deleteButton);
    grid.setExportButton(exportButton1);
    grid.setFunctionId("USERS");
    grid.setInsertButton(null);
    grid.setNavBar(navigatorBar1);
    grid.setReloadButton(reloadButton);
    grid.setInsertButton(insertButton);
    grid.setValueObjectClassName("demo38.UserVO");
    colUsername.setColumnFilterable(true);
    colUsername.setColumnName("username");
    colUsername.setUpperCase(true);
    colUsername.setTrimText(true);
    colUsername.setColumnSortable(true);
    colPassword.setColumnName("password");
    colPassword.setEncryptText(true);
    colDescription.setColumnName("description");
    colDescription.setPreferredWidth(350);
    colDescription.setEditableOnEdit(true);
    colDescription.setEditableOnInsert(true);
    colUsername.setEditableOnEdit(false);
    colUsername.setEditableOnInsert(true);
    colPassword.setEditableOnEdit(true);
    colPassword.setEditableOnInsert(true);
    insertButton.setText("insertButton1");
    grid.setSaveButton(saveButton);
    grid.setEditButton(editButton);
    exportButton1.setText("exportButton1");
    this.getContentPane().add(grid, BorderLayout.CENTER);
    this.getContentPane().add(buttonsPanel, BorderLayout.NORTH);
    buttonsPanel.add(insertButton, null);
    buttonsPanel.add(editButton, null);
    buttonsPanel.add(saveButton, null);
    buttonsPanel.add(reloadButton, null);
    buttonsPanel.add(deleteButton, null);
    buttonsPanel.add(exportButton1, null);
    buttonsPanel.add(navigatorBar1, null);

    grid.getColumnContainer().add(colUsername, null);
    grid.getColumnContainer().add(colPassword, null);
    grid.getColumnContainer().add(colDescription, null);
  }
Пример #27
0
  @SuppressWarnings("serial")
  public void GegevensTabel(int i) {
    String[] header = {"Spelernaam", "Pnt", "Res", "Krt"};
    String[][] data = null;
    data = oc.VulTabelRonde(i);
    spKaarten = new JScrollPane();
    getContentPane().add(spKaarten);
    spKaarten.setBounds(14, 168, 308, 126);
    spKaarten.setBorder(new LineBorder(new java.awt.Color(0, 0, 0), 0, false));
    spKaarten.setFont(new java.awt.Font("Arial", 0, 12));
    {
      tKaarten =
          new JTable(data, header) {

            public Component prepareRenderer(
                TableCellRenderer renderer, int rowIndex, int vColIndex) {
              Component c = super.prepareRenderer(renderer, rowIndex, vColIndex);
              if (rowIndex % 2 == 0 && !isCellSelected(rowIndex, vColIndex)) {
                c.setBackground(new java.awt.Color(202, 240, 202));
              } else {
                // If not shaded, match the table's
                // background
                c.setBackground(getBackground());
              }

              return c;
            }
          };

      naamKolom = tKaarten.getColumn(header[0]);
      naamKolom.setPreferredWidth(150);
      inzetKolom = tKaarten.getColumn(header[1]);
      inzetKolom.setPreferredWidth(30);
      resKolom = tKaarten.getColumn(header[2]);
      resKolom.setPreferredWidth(50);
      kaartKolom = tKaarten.getColumn(header[3]);
      kaartKolom.setPreferredWidth(30);
      spKaarten.setViewportView(tKaarten);
      tKaarten.setPreferredSize(new java.awt.Dimension(301, 126));
      tKaarten.setGridColor(new java.awt.Color(255, 255, 255));
      tKaarten.setBorder(new LineBorder(new java.awt.Color(90, 90, 90), 1, false));
      FlowLayout tKaartenLayout = new FlowLayout();
      tKaartenLayout.setAlignment(FlowLayout.LEFT);
      tKaarten.setLayout(tKaartenLayout);
      tKaarten.setFont(new java.awt.Font("Tahoma", 0, 12));
    }
  } // public void GegevensTabel(int i)
Пример #28
0
  /**
   * This method initializes resultUnattemptedPanel4
   *
   * @return javax.swing.JPanel
   */
  private JPanel getResultUnattemptedPanel4() {
    if (resultUnattemptedPanel4 == null) {
      resultUnattemptedLabel4 = new JLabel();
      resultUnattemptedLabel4.setFont(WINDOW_FONT_BOLD);
      resultUnattemptedLabel4.setText(TASK_RESULT_UNATTEMPTED);

      FlowLayout flowLayout = new FlowLayout();
      flowLayout.setAlignment(FlowLayout.LEFT);

      resultUnattemptedPanel4 = new JPanel();
      resultUnattemptedPanel4.setLayout(flowLayout);
      resultUnattemptedPanel4.setName("resultUnattemptedPanel4");
      resultUnattemptedPanel4.setBackground(WINDOW_BACKGROUND_COLOR);
      resultUnattemptedPanel4.add(resultUnattemptedLabel4, null);
    }
    return resultUnattemptedPanel4;
  }
Пример #29
0
  /**
   * This method initializes resultFailPanel4
   *
   * @return javax.swing.JPanel
   */
  private JPanel getResultFailPanel4() {
    if (resultFailPanel4 == null) {
      resultFailIconLabel4 = new JLabel();
      resultFailIconLabel4.setIcon(new ImageIcon(getClass().getResource("images/fail.gif")));
      resultFailIconLabel4.setFont(WINDOW_FONT_BOLD);
      resultFailIconLabel4.setText(TASK_RESULT_FAIL_DOWNLOAD);
      FlowLayout flowLayout = new FlowLayout();
      flowLayout.setAlignment(FlowLayout.LEFT);

      resultFailPanel4 = new JPanel();
      resultFailPanel4.setLayout(flowLayout);
      resultFailPanel4.setName("resultFailPanel4");
      resultFailPanel4.setBackground(WINDOW_BACKGROUND_COLOR);
      resultFailPanel4.add(resultFailIconLabel4, null);
    }
    return resultFailPanel4;
  }
Пример #30
0
  /**
   * This method initializes resultPassPanel4
   *
   * @return javax.swing.JPanel
   */
  private JPanel getResultPassPanel4() {
    if (resultPassPanel4 == null) {
      resultPassLabel4 = new JLabel();
      resultPassLabel4.setFont(WINDOW_FONT_BOLD);
      resultPassLabel4.setText("x of y");

      FlowLayout flowLayout = new FlowLayout();
      flowLayout.setAlignment(FlowLayout.LEFT);

      resultPassPanel4 = new JPanel();
      resultPassPanel4.setLayout(flowLayout);
      resultPassPanel4.setName("resultPassPanel4");
      resultPassPanel4.setBackground(WINDOW_BACKGROUND_COLOR);
      resultPassPanel4.add(resultPassLabel4, null);
    }
    return resultPassPanel4;
  }