Example #1
0
  /** Initialize the contents of the frame. */
  private void initialize() {
    frmDish = new JFrame();
    frmDish.getContentPane().setBackground(Color.WHITE);
    frmDish.setTitle("Add New Dish");
    frmDish.setBounds(100, 100, 631, 436);
    frmDish.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frmDish.getContentPane().setLayout(null);

    txt_Recipe = new JTextField();
    txt_Recipe.setBounds(249, 59, 119, 30);
    frmDish.getContentPane().add(txt_Recipe);
    txt_Recipe.setColumns(10);

    JLabel lblRecipeName = new JLabel("Recipe Name");
    lblRecipeName.setBounds(132, 67, 93, 14);
    frmDish.getContentPane().add(lblRecipeName);

    cb_Rating = new JComboBox();
    cb_Rating.setModel(new DefaultComboBoxModel(new String[] {"1", "2", "3", "4", "5"}));
    cb_Rating.setBounds(249, 135, 119, 30);
    frmDish.getContentPane().add(cb_Rating);

    JLabel lblRating = new JLabel("Rating");
    lblRating.setBounds(132, 143, 46, 14);
    frmDish.getContentPane().add(lblRating);

    txt_Cousine = new JTextField();
    txt_Cousine.setBounds(249, 206, 119, 30);
    frmDish.getContentPane().add(txt_Cousine);
    txt_Cousine.setColumns(10);

    JLabel lblCousine = new JLabel("Cousine");
    lblCousine.setBounds(132, 214, 46, 14);
    frmDish.getContentPane().add(lblCousine);

    JButton btnNext = new JButton("Next");
    btnNext.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent arg0) {
            AddToDatabase();
            Add_New_Recipe.run();
            frmDish.dispose();
          }
        });
    btnNext.setBounds(458, 335, 89, 23);
    frmDish.getContentPane().add(btnNext);

    JButton btnBack = new JButton("Back");
    btnBack.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent e) {
            MainMenu.run();
            frmDish.dispose();
          }
        });
    btnBack.setBounds(28, 335, 89, 23);
    frmDish.getContentPane().add(btnBack);
  }
  public ReportDisabledParkingSpace() {
    super();
    setTitle("Report Disable Parking Space");

    JButton btnCreate = new JButton("Create");
    btnCreate.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {}
        });
    btnCreate.setBounds(148, 207, 89, 23);
    getContentPane().add(btnCreate);

    JLabel lblPlace = new JLabel("Place:");
    lblPlace.setBounds(79, 44, 46, 14);
    getContentPane().add(lblPlace);

    textField = new JTextField();
    textField.setBounds(148, 38, 146, 26);
    getContentPane().add(textField);
    textField.setColumns(10);

    JLabel lblReason = new JLabel("Reason:");
    lblReason.setBounds(79, 80, 46, 14);
    getContentPane().add(lblReason);

    textField_1 = new JTextField();
    textField_1.setBounds(148, 74, 146, 26);
    getContentPane().add(textField_1);
    textField_1.setColumns(10);
  }
Example #3
0
  public South(Draw d) {
    this.d = d;
    initTree(tree);
    setBackground(Color.black);
    send.addActionListener(this);
    step.addActionListener(this);

    node1.setForeground(Color.white);
    this.add(node1);
    attachment1.setColumns(4);
    this.add(attachment1);

    node2.setForeground(Color.white);
    this.add(node2);
    attachment2.setColumns(4);
    this.add(attachment2);

    cost.setForeground(Color.white);
    this.add(cost);
    valueOfArc.setColumns(4);
    this.add(valueOfArc);
    this.add(send);
    this.add(step);

    author.setFont(new Font("SimSun-ExtB", Font.ITALIC, 10));
    author.setForeground(Color.BLACK);

    this.add(author);
    lblCebotarencoDan.setFont(new Font("SimSun-ExtB", Font.ITALIC, 10));
    lblCebotarencoDan.setForeground(Color.WHITE);

    add(lblCebotarencoDan);
  }
  /** Create the frame. */
  public DeleteBlank() {
    setTitle("\u53BB\u6389\u5B57\u7B26\u4E32\u4E2D\u7684\u6240\u6709\u7A7A\u683C");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 386, 128);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(null);

    JLabel label = new JLabel("\u8F93\u5165\u5B57\u7B26\u4E32\uFF1A");
    label.setBounds(21, 10, 75, 15);
    contentPane.add(label);

    JButton button = new JButton("\u53BB\u9664\u7A7A\u683C");
    button.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            do_button_actionPerformed(e);
          }
        });
    button.setBounds(10, 49, 82, 23);
    contentPane.add(button);

    textField = new JTextField();
    textField.setBounds(102, 2, 258, 30);
    contentPane.add(textField);
    textField.setColumns(10);

    resultField = new JTextField();
    resultField.setBounds(102, 45, 258, 30);
    contentPane.add(resultField);
    resultField.setColumns(10);
  }
  private Component createTabSplitPane() {
    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);

    JPanel panel = new JPanel(new MigLayout("fill"));
    splitPane.setTopComponent(panel);
    JTextField textField = new JTextField();
    textField.setColumns(15);
    panel.add(textField);

    on(new JTextFieldDocumentChangedTrigger(textField)) //
        .read(new JTextFieldTextProvider(textField)) //
        .check(new StringNotEmptyRule()) //
        .handleWith(new IconBooleanFeedback(textField)) //
        .trigger();

    panel = new JPanel(new MigLayout("fill"));
    splitPane.setBottomComponent(panel);
    textField = new JTextField();
    textField.setColumns(15);
    panel.add(textField);

    on(new JTextFieldDocumentChangedTrigger(textField)) //
        .read(new JTextFieldTextProvider(textField)) //
        .check(new StringNotEmptyRule()) //
        .handleWith(new IconBooleanFeedback(textField)) //
        .trigger();

    return splitPane;
  }
    /** Create the dialog. */
    public GuiWinAndGsize() {
      setBounds(100, 100, 450, 300);
      getContentPane().setLayout(new BorderLayout());
      contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
      getContentPane().add(contentPanel, BorderLayout.CENTER);
      contentPanel.setLayout(null);

      JLabel windowSizeLabel = new JLabel("windowSize");
      windowSizeLabel.setBounds(120, 72, 89, 31);
      contentPanel.add(windowSizeLabel);

      windowSizetextField = new JTextField();
      windowSizetextField.setBounds(212, 72, 127, 31);
      contentPanel.add(windowSizetextField);
      windowSizetextField.setColumns(10);

      JLabel lblGsize = new JLabel("gapSize");
      lblGsize.setBounds(120, 135, 89, 15);
      contentPanel.add(lblGsize);

      gapSizetextField = new JTextField();
      gapSizetextField.setColumns(10);
      gapSizetextField.setBounds(212, 127, 127, 31);
      contentPanel.add(gapSizetextField);
      {
        JPanel buttonPane = new JPanel();
        buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
        getContentPane().add(buttonPane, BorderLayout.SOUTH);
        {
          JButton okButton = new JButton("OK");
          okButton.addActionListener(
              new ActionListener() {
                public void actionPerformed(ActionEvent arg0) {
                  windowSize = Integer.parseInt(windowSizetextField.getText());
                  gapSize = Integer.parseInt(gapSizetextField.getText());
                  System.out.println(windowSize);
                  System.out.println(gapSize);
                  setVisible(false);
                }
              });
          okButton.setActionCommand("OK");
          buttonPane.add(okButton);
          getRootPane().setDefaultButton(okButton);
        }
        {
          JButton cancelButton = new JButton("Cancel");
          cancelButton.addActionListener(
              new ActionListener() {
                public void actionPerformed(ActionEvent arg0) {
                  setVisible(false);

                  //							System.exit(1);
                }
              });
          cancelButton.setActionCommand("Cancel");
          buttonPane.add(cancelButton);
        }
      }
    }
Example #7
0
  public MessageDebuggerPanel() {
    setLayout(new BorderLayout(0, 0));

    JPanel panelT = new JPanel();
    add(panelT, BorderLayout.NORTH);
    panelT.setLayout(new BorderLayout(0, 0));

    JPanel panelTL = new JPanel();
    panelT.add(panelTL, BorderLayout.WEST);
    panelTL.setLayout(new BorderLayout(0, 0));

    JPanel panelTLL = new JPanel();
    panelTL.add(panelTLL, BorderLayout.WEST);
    panelTLL.setLayout(new BorderLayout(0, 0));

    lblToFrom = new JLabel("To:");
    panelTLL.add(lblToFrom, BorderLayout.NORTH);

    txtToFrom = new JTextField();
    txtToFrom.setText(UDPController.getBroadcastAddress() + ":" + UDPController.getDefaultPort());
    panelTLL.add(txtToFrom, BorderLayout.SOUTH);
    txtToFrom.setColumns(15);

    JPanel panelTLR = new JPanel();
    panelTLR.setBorder(new EmptyBorder(0, 5, 0, 5));
    panelTL.add(panelTLR, BorderLayout.EAST);
    panelTLR.setLayout(new BorderLayout(0, 0));

    JLabel lblMessage = new JLabel("Message:");
    panelTLR.add(lblMessage, BorderLayout.NORTH);

    cbMessage = new JComboBox<ZMessageType>();
    panelTLR.add(cbMessage, BorderLayout.SOUTH);
    for (ZMessageType msg : ZMessageType.values()) cbMessage.addItem(msg);
    cbMessage.addItemListener(
        new ItemListener() {
          @Override
          public void itemStateChanged(ItemEvent e) {
            messageChanged();
          }
        });

    JPanel panelTC = new JPanel();
    panelT.add(panelTC, BorderLayout.CENTER);
    panelTC.setLayout(new BorderLayout(0, 0));

    JLabel lblContents = new JLabel("Contents:");
    panelTC.add(lblContents, BorderLayout.NORTH);

    txtContents = new JTextField();
    panelTC.add(txtContents, BorderLayout.SOUTH);
    txtContents.setColumns(10);

    lblDescription = new JLabel("...");
    add(lblDescription, BorderLayout.SOUTH);

    messageChanged();
  }
  public NewtonRaphson() {
    setLayout(null);

    textField = new JTextField();
    textField.setColumns(40);
    textField.setBounds(147, 24, 326, 20);
    add(textField);

    JLabel label = new JLabel("Fonksiyon : ");
    label.setBounds(32, 24, 92, 14);
    add(label);

    JLabel lblADeeri = new JLabel("X0  Degeri  : ");
    lblADeeri.setBounds(32, 62, 92, 14);
    add(lblADeeri);

    textField_1 = new JTextField();
    textField_1.setColumns(40);
    textField_1.setBounds(145, 62, 326, 20);
    add(textField_1);

    textField_2 = new JTextField();
    textField_2.setColumns(40);
    textField_2.setBounds(147, 100, 326, 20);
    add(textField_2);

    JLabel lblB = new JLabel("Tolerans Degeri : ");
    lblB.setBounds(32, 100, 100, 14);
    add(lblB);

    textField_4 = new JTextField();
    textField_4.setColumns(40);
    textField_4.setEditable(false);
    textField_4.setBounds(147, 131, 326, 20);
    add(textField_4);

    JLabel lblSonuc = new JLabel("Sonuc :");
    lblSonuc.setBounds(32, 134, 92, 14);
    add(lblSonuc);

    JButton button = new JButton("Hesapla");
    button.addMouseListener(
        new MouseAdapter() {
          @Override
          public void mouseClicked(MouseEvent arg0) {
            double x, eps, son;

            String fonk = textField.getText();
            x = Double.parseDouble(textField_1.getText());
            eps = Double.parseDouble(textField_2.getText());
            son = NR(fonk, x, eps);
            textField_4.setText(son + "");
          }
        });
    button.setBounds(32, 166, 441, 23);
    add(button);
  }
Example #9
0
 /** Create the dialog. */
 public MovVenda() {
   setTitle("Venda");
   setBounds(100, 100, 450, 300);
   getContentPane().setLayout(new BorderLayout());
   contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
   getContentPane().add(contentPanel, BorderLayout.CENTER);
   contentPanel.setLayout(null);
   {
     JLabel lblDataDeVenda = new JLabel("Data de Venda:");
     lblDataDeVenda.setBounds(12, 12, 123, 15);
     contentPanel.add(lblDataDeVenda);
   }
   {
     textField = new JTextField();
     textField.setBounds(153, 10, 78, 19);
     contentPanel.add(textField);
     textField.setColumns(10);
   }
   {
     JLabel lblQuantidadeVendida = new JLabel("Quantidade Vendida:");
     lblQuantidadeVendida.setBounds(12, 39, 168, 15);
     contentPanel.add(lblQuantidadeVendida);
   }
   {
     textField_1 = new JTextField();
     textField_1.setBounds(179, 37, 52, 19);
     contentPanel.add(textField_1);
     textField_1.setColumns(10);
   }
   {
     JLabel lblPreoUnitrio = new JLabel("Preço Unitário:");
     lblPreoUnitrio.setBounds(12, 66, 123, 15);
     contentPanel.add(lblPreoUnitrio);
   }
   {
     textField_2 = new JTextField();
     textField_2.setBounds(142, 64, 91, 19);
     contentPanel.add(textField_2);
     textField_2.setColumns(10);
   }
   {
     JPanel buttonPane = new JPanel();
     buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
     getContentPane().add(buttonPane, BorderLayout.SOUTH);
     {
       JButton okButton = new JButton("OK");
       okButton.setActionCommand("OK");
       buttonPane.add(okButton);
       getRootPane().setDefaultButton(okButton);
     }
     {
       JButton cancelButton = new JButton("Cancel");
       cancelButton.setActionCommand("Cancel");
       buttonPane.add(cancelButton);
     }
   }
 }
  /** Create the frame. */
  public Borrar() {
    addWindowListener(
        new WindowAdapter() {
          @Override
          public void windowClosing(WindowEvent e) {

            int sele =
                JOptionPane.showConfirmDialog(
                    null, "Desea Salir?", "Desea Salir?", JOptionPane.YES_NO_OPTION);
            if (sele == 0) {
              dispose();
            }
          }
        });
    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    setBounds(100, 100, 450, 300);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(null);

    JLabel lblNewLabel = new JLabel("Nombre");
    lblNewLabel.setBounds(56, 64, 46, 14);
    contentPane.add(lblNewLabel);

    JLabel lblNewLabel_1 = new JLabel("Documento");
    lblNewLabel_1.setBounds(56, 102, 72, 14);
    contentPane.add(lblNewLabel_1);

    textField = new JTextField();
    textField.setBounds(164, 99, 112, 20);
    contentPane.add(textField);
    textField.setColumns(10);

    textField_1 = new JTextField();
    textField_1.setBounds(164, 61, 112, 20);
    contentPane.add(textField_1);
    textField_1.setColumns(10);

    JButton btnNewButton = new JButton("Aceptar");
    btnNewButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {

            int sel =
                JOptionPane.showConfirmDialog(
                    null,
                    "Esta seguro que desea eliminar este aprendiz",
                    "Esta seguro que desea eliminar este aprendiz",
                    JOptionPane.YES_NO_OPTION);

            if (sel == 0) {}
          }
        });
    btnNewButton.setBounds(159, 162, 91, 23);
    contentPane.add(btnNewButton);
  }
  public AttributeEvaluationConfigurationPanelView() {
    setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
    setPreferredSize(new Dimension(445, 120));
    SpringLayout springLayout = new SpringLayout();
    setLayout(springLayout);

    lblSelectAlgorithm = new JLabel("Select algorithm:");
    springLayout.putConstraint(
        SpringLayout.NORTH, lblSelectAlgorithm, 13, SpringLayout.NORTH, this);
    springLayout.putConstraint(SpringLayout.WEST, lblSelectAlgorithm, 10, SpringLayout.WEST, this);
    add(lblSelectAlgorithm);

    algorithmComboBox = new JComboBox();
    springLayout.putConstraint(SpringLayout.NORTH, algorithmComboBox, 10, SpringLayout.NORTH, this);
    springLayout.putConstraint(
        SpringLayout.WEST, algorithmComboBox, 6, SpringLayout.EAST, lblSelectAlgorithm);
    springLayout.putConstraint(SpringLayout.EAST, algorithmComboBox, -95, SpringLayout.EAST, this);
    add(algorithmComboBox);

    btnConfigure = new JButton("Configure");
    springLayout.putConstraint(
        SpringLayout.NORTH, btnConfigure, -4, SpringLayout.NORTH, lblSelectAlgorithm);
    springLayout.putConstraint(
        SpringLayout.WEST, btnConfigure, 6, SpringLayout.EAST, algorithmComboBox);
    add(btnConfigure);

    lblNumberOfThreads = new JLabel("Number of threads:");
    springLayout.putConstraint(
        SpringLayout.WEST, lblNumberOfThreads, 0, SpringLayout.WEST, lblSelectAlgorithm);
    springLayout.putConstraint(
        SpringLayout.SOUTH, lblNumberOfThreads, -11, SpringLayout.SOUTH, this);
    add(lblNumberOfThreads);

    threadsTextField = new JTextField();
    springLayout.putConstraint(
        SpringLayout.NORTH, threadsTextField, -3, SpringLayout.NORTH, lblNumberOfThreads);
    springLayout.putConstraint(
        SpringLayout.WEST, threadsTextField, 6, SpringLayout.EAST, lblNumberOfThreads);
    springLayout.putConstraint(SpringLayout.EAST, threadsTextField, -281, SpringLayout.EAST, this);
    add(threadsTextField);
    threadsTextField.setColumns(10);

    cvCheckBox = new JCheckBox("Use Cross-Validation. Number of folds:");
    springLayout.putConstraint(
        SpringLayout.NORTH, cvCheckBox, 16, SpringLayout.SOUTH, algorithmComboBox);
    springLayout.putConstraint(SpringLayout.WEST, cvCheckBox, 10, SpringLayout.WEST, this);
    add(cvCheckBox);

    cvTextField = new JTextField();
    springLayout.putConstraint(SpringLayout.NORTH, cvTextField, 1, SpringLayout.NORTH, cvCheckBox);
    springLayout.putConstraint(SpringLayout.WEST, cvTextField, 6, SpringLayout.EAST, cvCheckBox);
    springLayout.putConstraint(SpringLayout.EAST, cvTextField, 56, SpringLayout.EAST, cvCheckBox);
    cvTextField.setText("10");
    add(cvTextField);
    cvTextField.setColumns(10);
  }
  /** Create the frame. */
  public ImageSaveFrame() {
    setTitle("\u8BFB\u53D6\u6587\u4EF6\u8DEF\u5F84\u5230\u6570\u636E\u5E93");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 400, 180);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(new GridLayout(3, 1, 5, 5));

    JPanel pathPanel = new JPanel();
    contentPane.add(pathPanel);

    JLabel pathLabel = new JLabel("\u8DEF\u5F84\u540D\uFF1A");
    pathLabel.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 16));
    pathPanel.add(pathLabel);

    pathTextField = new JTextField();
    pathTextField.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 16));
    pathPanel.add(pathTextField);
    pathTextField.setColumns(15);

    JPanel namePanel = new JPanel();
    contentPane.add(namePanel);

    JLabel nameLabel = new JLabel("\u6587\u4EF6\u540D\uFF1A");
    nameLabel.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 16));
    namePanel.add(nameLabel);

    nameTextField = new JTextField();
    nameTextField.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 16));
    namePanel.add(nameTextField);
    nameTextField.setColumns(15);

    JPanel buttonPanel = new JPanel();
    contentPane.add(buttonPanel);

    JButton chooseButton = new JButton("\u9009\u62E9\u56FE\u7247");
    chooseButton.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 16));
    chooseButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            do_chooseButton_actionPerformed(arg0);
          }
        });
    buttonPanel.add(chooseButton);

    JButton saveButton = new JButton("\u4FDD\u5B58\u56FE\u7247");
    saveButton.setFont(new Font("΢ÈíÑźÚ", Font.PLAIN, 16));
    saveButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            do_saveButton_actionPerformed(arg0);
          }
        });
    buttonPanel.add(saveButton);
  }
  /** Initialize the contents of the frame. */
  private void initialize(final int s) {
    frame = new JFrame();
    frame.setBounds(100, 100, 450, 300);
    frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
    frame.getContentPane().setLayout(null);

    JLabel lblPersonalContact = new JLabel("Personal Contact");
    lblPersonalContact.setBounds(158, 29, 122, 15);
    frame.getContentPane().add(lblPersonalContact);

    JLabel lblContextOfMeeting = new JLabel("Context of meeting");
    lblContextOfMeeting.setBounds(56, 78, 141, 15);
    frame.getContentPane().add(lblContextOfMeeting);

    JLabel lblMemorableEvent = new JLabel("Memorable Event");
    lblMemorableEvent.setBounds(56, 107, 141, 15);
    frame.getContentPane().add(lblMemorableEvent);

    JLabel lblDateOfAcquaintance = new JLabel("Date of Acquaintance");
    lblDateOfAcquaintance.setBounds(56, 136, 152, 15);
    frame.getContentPane().add(lblDateOfAcquaintance);

    textField = new JTextField();
    textField.setBounds(224, 76, 171, 19);
    frame.getContentPane().add(textField);
    textField.setColumns(10);

    textField_1 = new JTextField();
    textField_1.setBounds(224, 105, 171, 19);
    frame.getContentPane().add(textField_1);
    textField_1.setColumns(10);

    textField_2 = new JTextField();
    textField_2.setBounds(224, 134, 171, 19);
    frame.getContentPane().add(textField_2);
    textField_2.setColumns(10);

    JButton btnSaveReturn = new JButton("Save & Return");
    btnSaveReturn.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            String st = textField.getText();
            Run.per.elementAt(s).set_context(st);
            st = textField_1.getText();
            Run.per.elementAt(s).set_events(st);
            st = textField_2.getText();
            Run.per.elementAt(s).set_date(st);
            frame.setVisible(false);
          }
        });
    btnSaveReturn.setBounds(150, 175, 152, 25);
    frame.getContentPane().add(btnSaveReturn);
  }
Example #14
0
  /** Registration Contact Information panel. */
  public Reg_CI() {
    setLayout(null);
    setSize(343, 210);

    JLabel lblNewLabel = new JLabel("Contact Information");
    lblNewLabel.setBounds(110, 11, 120, 14);
    add(lblNewLabel);

    JLabel lblPhoneNumber = new JLabel("Phone Number:");
    lblPhoneNumber.setBounds(10, 36, 120, 14);
    add(lblPhoneNumber);

    JLabel lblState = new JLabel("State:");
    lblState.setBounds(10, 85, 120, 14);
    add(lblState);

    JLabel lblAddress = new JLabel("Address");
    lblAddress.setBounds(129, 60, 74, 14);
    add(lblAddress);

    JLabel lblCity = new JLabel("City:");
    lblCity.setBounds(10, 109, 120, 14);
    add(lblCity);

    JLabel lblStreet = new JLabel("Street:");
    lblStreet.setBounds(10, 134, 74, 14);
    add(lblStreet);

    JLabel lblZipCode = new JLabel("ZIP Code:");
    lblZipCode.setBounds(10, 159, 74, 14);
    add(lblZipCode);

    textField = new JTextField();
    textField.setBounds(247, 82, 39, 20);
    add(textField);
    textField.setColumns(10);

    textField_1 = new JTextField();
    textField_1.setColumns(10);
    textField_1.setBounds(87, 106, 199, 20);
    add(textField_1);

    textField_2 = new JTextField();
    textField_2.setColumns(10);
    textField_2.setBounds(87, 131, 199, 20);
    add(textField_2);

    textField_3 = new JTextField();
    textField_3.setColumns(10);
    textField_3.setBounds(212, 156, 74, 20);
    add(textField_3);
  }
 public void init() {
   txt_sexo = new JTextField();
   txt_sexo.setColumns(10);
   txt_nombre = new JTextField();
   txt_nombre.setColumns(10);
   lbl_nombre = new JLabel("Nombre:");
   lbl_sexo = new JLabel("Sexo:");
   btn_modificar = new JButton("Modificar");
   btn_modificar.addActionListener(this);
   tbl_employees = new JTable(new MyTablemod(filastotales));
   tbl_employees.setPreferredScrollableViewportSize(new Dimension(500, 70));
   tbl_employees.setFillsViewportHeight(true);
 }
  public RangeComponent(NumberFormat format) {

    this.format = format;

    minTxtField = new JTextField();
    minTxtField.setColumns(8);

    maxTxtField = new JTextField();
    maxTxtField.setColumns(8);

    add(minTxtField, 0, 0, 1, 1, 1, 0, GridBagConstraints.HORIZONTAL);
    add(new JLabel(" - "), 1, 0, 1, 1, 0, 0);
    add(maxTxtField, 2, 0, 1, 1, 1, 0, GridBagConstraints.HORIZONTAL);
  }
  /** Create the frame. */
  public DianKongGuanLiFrame() {
    setTitle("大同大学校园一卡通系统——教学管理");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setBounds(100, 100, 354, 347);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    contentPane.setLayout(null);
    setContentPane(contentPane);

    textField = new JTextField();
    textField.setBounds(166, 65, 124, 21);
    contentPane.add(textField);
    textField.setColumns(10);

    JLabel label_1 = new JLabel("卡号:");
    label_1.setFont(new Font("宋体", Font.PLAIN, 16));
    label_1.setBounds(76, 56, 93, 37);
    contentPane.add(label_1);

    JLabel label = new JLabel("学生号:");
    label.setFont(new Font("宋体", Font.PLAIN, 16));
    label.setBounds(76, 104, 93, 37);
    contentPane.add(label);

    textField_1 = new JTextField();
    textField_1.setColumns(10);
    textField_1.setBounds(166, 113, 124, 21);
    contentPane.add(textField_1);

    JLabel label_3 = new JLabel("密码:");
    label_3.setFont(new Font("宋体", Font.PLAIN, 16));
    label_3.setBounds(76, 151, 93, 37);
    contentPane.add(label_3);

    JButton button_7 = new JButton("登    录");
    button_7.setBackground(Color.GREEN);
    button_7.setBounds(76, 233, 99, 36);
    contentPane.add(button_7);

    textField_5 = new JTextField();
    textField_5.setColumns(10);
    textField_5.setBounds(166, 160, 124, 21);
    contentPane.add(textField_5);

    JButton button = new JButton("密码重置");
    button.setBackground(Color.GREEN);
    button.setBounds(185, 233, 105, 36);
    contentPane.add(button);
  }
Example #18
0
  /** Create the dialog. */
  public Dialog() {
    setBounds(100, 100, 248, 185);
    getContentPane().setLayout(new BorderLayout());
    contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    getContentPane().add(contentPanel, BorderLayout.CENTER);
    contentPanel.setLayout(null);
    {
      textField_1 = new JTextField();
      textField_1.setBounds(79, 39, 143, 20);
      contentPanel.add(textField_1);
      textField_1.setColumns(10);
    }
    {
      textField = new JTextField();
      textField.setBounds(79, 8, 143, 20);
      contentPanel.add(textField);
      textField.setColumns(10);
    }

    JLabel lblUsername = new JLabel("Username");
    lblUsername.setBounds(10, 11, 60, 14);
    contentPanel.add(lblUsername);

    JLabel lblNewLabel = new JLabel("Password");
    lblNewLabel.setBounds(10, 42, 60, 14);
    contentPanel.add(lblNewLabel);
    {
      JButton okButton = new JButton("OK");
      okButton.setBounds(10, 70, 105, 23);
      contentPanel.add(okButton);
      okButton.setActionCommand("OK");
      getRootPane().setDefaultButton(okButton);
    }
    {
      JButton cancelButton = new JButton("Cancel");
      cancelButton.setBounds(125, 70, 97, 23);
      contentPanel.add(cancelButton);
      cancelButton.setActionCommand("Cancel");
    }

    JButton btnNewButton = new JButton("Help");
    btnNewButton.setBounds(10, 104, 105, 23);
    contentPanel.add(btnNewButton);

    JButton btnNewButton_1 = new JButton("Register");
    btnNewButton_1.setBounds(125, 104, 97, 23);
    contentPanel.add(btnNewButton_1);
  }
 /**
  * This method initializes srvHostTextField
  *
  * @return javax.swing.JTextField
  */
 private JTextField getSrvHostTextField() {
   if (srvHostTextField == null) {
     srvHostTextField = new JTextField();
     srvHostTextField.setColumns(50);
   }
   return srvHostTextField;
 }
Example #20
0
  public JointPriorDialog(JFrame frame, BeautiOptions options) {
    this.frame = frame;

    this.options = options;

    priorSettingsPanel = new PriorSettingsPanel(frame);

    nameField.setColumns(30);

    parametersTableModel = new ParametersTableModel();
    //        TableSorter sorter = new TableSorter(traitsTableModel);
    //        traitsTable = new JTable(sorter);
    //        sorter.setTableHeader(traitsTable.getTableHeader());
    parametersTable = new JTable(parametersTableModel);

    parametersTable.getTableHeader().setReorderingAllowed(false);
    parametersTable.getTableHeader().setResizingAllowed(false);
    //        traitsTable.getTableHeader().setDefaultRenderer(
    //                new HeaderRenderer(SwingConstants.LEFT, new Insets(0, 4, 0, 4)));

    parametersTable
        .getSelectionModel()
        .setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
    parametersTable
        .getSelectionModel()
        .addListSelectionListener(
            new ListSelectionListener() {
              public void valueChanged(ListSelectionEvent evt) {
                parametersSelectionChanged();
              }
            });
  }
  private Component createTabDisabled() {
    JPanel panel = new JPanel(new MigLayout("fill, wrap 1"));

    final JTextField textField = new JTextField();
    final JCheckBox checkBox = new JCheckBox("Enabled");
    checkBox.setSelected(true);
    panel.add(checkBox);
    checkBox.addActionListener(
        new ActionListener() {
          @Override
          public void actionPerformed(ActionEvent actionEvent) {
            textField.setEnabled(checkBox.isSelected());
          }
        });

    panel.add(textField);
    textField.setColumns(15);

    on(new JTextFieldDocumentChangedTrigger(textField)) //
        .read(new JTextFieldTextProvider(textField)) //
        .check(new StringNotEmptyRule()) //
        .handleWith(new IconBooleanFeedback(textField, "Cannot be empty")) //
        .trigger();

    return panel;
  }
Example #22
0
  public FloatInput(String var, float _value, String _label) {
    variable = var;
    value = _value;

    setLayout(new BorderLayout(5, 5));

    label = new JLabel(_label);

    add(label, BorderLayout.WEST);

    int defValue = (int) (_value * 100);

    slider = new JSlider(SwingConstants.HORIZONTAL, 0, 100, defValue);
    slider.setMajorTickSpacing(25);
    slider.setMinorTickSpacing(5);
    slider.setPaintTicks(true);
    slider.setPaintLabels(false);

    slider.addChangeListener(this);

    add(slider, BorderLayout.CENTER);

    text = new JTextField();
    text.setEditable(false);
    text.setColumns(4);

    refresh();

    JPanel temp = new JPanel();
    temp.setLayout(new FlowLayout(FlowLayout.CENTER));

    temp.add(text);

    add(temp, BorderLayout.EAST);
  }
Example #23
0
  public ManageBankView() {
    GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.columnWidths = new int[] {0, 0, 0, 0, 0};
    gridBagLayout.rowHeights = new int[] {0, 0, 0, 0, 0};
    gridBagLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE};
    gridBagLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    getContentPane().setLayout(gridBagLayout);

    JLabel lblEnterBank = new JLabel("Enter Bank");
    GridBagConstraints gbc_lblEnterBank = new GridBagConstraints();
    gbc_lblEnterBank.insets = new Insets(0, 0, 5, 5);
    gbc_lblEnterBank.gridx = 1;
    gbc_lblEnterBank.gridy = 1;
    getContentPane().add(lblEnterBank, gbc_lblEnterBank);

    txtBankName = new JTextField();
    GridBagConstraints gbc_txtBankName = new GridBagConstraints();
    gbc_txtBankName.insets = new Insets(0, 0, 5, 0);
    gbc_txtBankName.fill = GridBagConstraints.HORIZONTAL;
    gbc_txtBankName.gridx = 3;
    gbc_txtBankName.gridy = 1;
    getContentPane().add(txtBankName, gbc_txtBankName);
    txtBankName.setColumns(10);

    JButton btnAdd = new JButton("Add");
    GridBagConstraints gbc_btnAdd = new GridBagConstraints();
    gbc_btnAdd.insets = new Insets(0, 0, 0, 5);
    gbc_btnAdd.gridx = 1;
    gbc_btnAdd.gridy = 3;
    getContentPane().add(btnAdd, gbc_btnAdd);
  }
Example #24
0
  private void createReplacePanel() {
    if (!table.isReadOnly()) {
      replaceField.setColumns(textFieldLength);
      replaceField.addKeyListener(new FindReplaceTextFieldKeyAdapter());

      replaceButton = createButton(getResourceString("SS_SR_REPLACE"));
      replaceButton.addActionListener(replaceAction);

      replaceAllButton = createButton(getResourceString("SS_SR_REPLACEALL"));
      replaceAllButton.addActionListener(replaceAction);

      // replaceButton.setMnemonic(KeyEvent.VK_N);
      // replaceButton.addActionListener(searchAction);
      // JComponent[] itemSample = { new JMenuItem("Replace"), new JMenuItem("Replace All") };
      // memoryReplaceButton = new MemoryDropDownButton("Replace",
      // IconManager.getIcon("DropDownArrow"),
      // 1, java.util.Arrays.asList(itemSample));
      // memoryReplaceButton.setOverrideBorder(true, memoryReplaceButton.raisedBorder);
      // memoryReplaceButton.setEnabled(false);

      builder.add(replaceField, cc.xy(5, 3));
      builder.add(replaceButton, cc.xy(7, 3));
      builder.add(replaceAllButton, cc.xy(9, 3));
    }
  }
Example #25
0
  /** Create the dialog. */
  public requestDpixdist() {
    setTitle("Input Lines Height");
    setResizable(false);
    setBounds(100, 100, 333, 169);
    contentPanel = new JPanel();
    contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPanel);
    GridBagLayout gbl_contentPane = new GridBagLayout();
    gbl_contentPane.columnWidths = new int[] {0, 0, 0, 0};
    gbl_contentPane.rowHeights = new int[] {0, 0, 0, 0, 0, 0, 0};
    gbl_contentPane.columnWeights = new double[] {0.0, 0.0, 1.0, Double.MIN_VALUE};
    gbl_contentPane.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
    contentPanel.setLayout(gbl_contentPane);

    JLabel lblHeightOfLines = new JLabel("Height of black lines (mm):");
    GridBagConstraints gbc_lblHeightOfLines = new GridBagConstraints();
    gbc_lblHeightOfLines.anchor = GridBagConstraints.EAST;
    gbc_lblHeightOfLines.insets = new Insets(0, 0, 5, 5);
    gbc_lblHeightOfLines.gridx = 1;
    gbc_lblHeightOfLines.gridy = 1;
    contentPanel.add(lblHeightOfLines, gbc_lblHeightOfLines);

    heightText = new JTextField();
    heightText.setMaximumSize(new Dimension(4, 20));
    GridBagConstraints gbc_heightText = new GridBagConstraints();
    gbc_heightText.fill = GridBagConstraints.HORIZONTAL;
    gbc_heightText.insets = new Insets(0, 0, 5, 0);
    gbc_heightText.gridx = 2;
    gbc_heightText.gridy = 1;
    contentPanel.add(heightText, gbc_heightText);
    heightText.setColumns(10);
  }
Example #26
0
 private void componentes() {
   JLabel lblLogin = new JLabel("Login");
   lblLogin.setFont(new Font("Tahoma", Font.PLAIN, 13));
   lblLogin.setBounds(10, 11, 46, 14);
   getContentPane().add(lblLogin);
   jLogin = new JTextField();
   jLogin.setBounds(66, 9, 128, 20);
   getContentPane().add(jLogin);
   jLogin.setColumns(10);
   JLabel lblSenha = new JLabel("Senha");
   lblSenha.setFont(new Font("Tahoma", Font.PLAIN, 13));
   lblSenha.setBounds(10, 36, 46, 14);
   getContentPane().add(lblSenha);
   jSenha = new JPasswordField();
   jSenha.setBounds(66, 40, 128, 20);
   getContentPane().add(jSenha);
   jSenha.setColumns(10);
   btnEntrar = new JButton("Entrar");
   btnEntrar.setBounds(204, 8, 128, 23);
   getContentPane().add(btnEntrar);
   btnNovoCadastro = new JButton("Novo Cadastro");
   btnNovoCadastro.setBounds(204, 39, 128, 23);
   getContentPane().add(btnNovoCadastro);
   btnEsqueciASenha = new JButton("Esqueci a Senha");
   btnEsqueciASenha.setBounds(66, 71, 128, 23);
   getContentPane().add(btnEsqueciASenha);
 }
  public SimpleSearchDialog(JDialog owner, SearchableListDialog dialogToSearch) {
    super(owner, false);

    _owner = owner;
    _dialogToSearch = dialogToSearch;
    _lastMatchedListIndex = -1;

    ResourceMap resourceMap =
        Application.getInstance().getContext().getResourceMap(SimpleSearchDialog.class);
    resourceMap.injectFields(this);
    ActionMap actionMap = Application.getInstance().getContext().getActionMap(this);

    setTitle(title);
    getContentPane().setLayout(new BorderLayout(0, 0));

    _pnlMain = new JPanel();
    _pnlMain.setBorder(new EmptyBorder(10, 10, 10, 10));
    getContentPane().add(_pnlMain, BorderLayout.NORTH);
    _pnlMain.setLayout(new BorderLayout(0, 0));

    _lblEnterSearchString = new JLabel(enterStringCaption);
    _lblEnterSearchString.setBorder(new EmptyBorder(0, 0, 10, 0));
    _pnlMain.add(_lblEnterSearchString, BorderLayout.NORTH);

    _txtFldSearch = new JTextField();
    _pnlMain.add(_txtFldSearch);
    _txtFldSearch.setColumns(10);

    _pnlButtons = new JPanel();
    getContentPane().add(_pnlButtons, BorderLayout.SOUTH);

    _btnSearch = new JButton();
    _btnSearch.setAction(actionMap.get("SimpleSearchDialog_Search"));
    _pnlButtons.add(_btnSearch);

    _btnCancel = new JButton();
    _btnCancel.setAction(actionMap.get("SimpleSearchDialog_Cancel"));
    _pnlButtons.add(_btnCancel);

    _txtFldSearch
        .getDocument()
        .addDocumentListener(
            new DocumentListener() {

              @Override
              public void removeUpdate(DocumentEvent e) {
                _lastMatchedListIndex = -1;
              }

              @Override
              public void insertUpdate(DocumentEvent e) {
                _lastMatchedListIndex = -1;
              }

              @Override
              public void changedUpdate(DocumentEvent e) {
                _lastMatchedListIndex = -1;
              }
            });
  }
Example #28
0
  /** Create the frame. */
  public Login() {
    setTitle("LOGIN");
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    setSize(450, 333);
    setLocationRelativeTo(null);
    contentPane = new JPanel();
    contentPane.setBackground(new Color(204, 255, 255));
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(null);

    JPanel panel = new JPanel();
    panel.setBorder(new LineBorder(new Color(0, 0, 0)));
    panel.setBounds(44, 43, 344, 208);
    contentPane.add(panel);
    panel.setLayout(null);

    JLabel lblNewLabel = new JLabel("USER : "******"PASSWORD:"******"");
    label.setBounds(30, 40, 32, 32);
    panel.add(label);
    label.setIcon(new ImageIcon(Login.class.getResource("/recursos/Administrator-icon.png")));

    JLabel label_1 = new JLabel("");
    label_1.setBounds(30, 98, 32, 32);
    panel.add(label_1);
    label_1.setIcon(new ImageIcon(Login.class.getResource("/recursos/key .png")));

    JButton btnNewButton = new JButton("LOGIN");
    btnNewButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {}
        });
    btnNewButton.setBounds(30, 145, 273, 37);
    panel.add(btnNewButton);

    JComboBox comboBox = new JComboBox();
    comboBox.setBounds(153, 39, 150, 32);
    panel.add(comboBox);

    JLabel lblNewLabel_2 = new JLabel("");
    lblNewLabel_2.setIcon(
        new ImageIcon(
            Login.class.getResource(
                "/recursos/wallpaper_celeste_y_violeta__abstracto__by_tutorialespopcorn-d6accdr.png")));
    lblNewLabel_2.setBounds(0, 0, 450, 300);
    contentPane.add(lblNewLabel_2);
  }
Example #29
0
  public synchronized void addThumbnail(File thumb, double percent) {
    ImagePanel panel_t = new ImagePanel();
    panel_t.setBackground(Color.DARK_GRAY);
    panel_t.setBounds(left, top, 100, 100);

    percent = 100 - (double) ((percent * 100) / 11041);

    DecimalFormat df = new DecimalFormat("#.##");

    textField = new JTextField();
    textField.setEditable(false);
    textField.setText(df.format(percent) + "%");
    textField.setBounds(left + 5, top - 5, 50, 20);
    textField.setColumns(10);

    panel_4.add(textField);
    panel_4.add(panel_t);

    panel_t.create(thumb, 100, 100);
    panel_t.repaint();
    panel_4.repaint();

    left += 110;
    top += 0;

    if (left % 450 == 0) {
      top += 110;
      left = 10;
    }
  }
Example #30
0
  public ChatFram() {
    // 窗体初始化设置
    this.setBounds(200, 200, 500, 200);
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    // 实例化组件
    pnlLeft = new JPanel();
    pnlInfo = new JPanel();
    txtMsg = new JTextArea();
    pnlSend = new JPanel();
    txtSendMsg = new JTextField();
    txtSendMsg.setColumns(20);
    btnSend = new JButton("send");
    lblInfo = new JLabel(new ImageIcon("image/ya1.gif"));

    // 添加左边的面板填充窗体区域
    this.add(pnlLeft);
    // 将信息面板添加至右边
    this.add(pnlInfo, BorderLayout.EAST);
    // 将左边面板的布局方式设置为边框布局,面板的默认布局是FlowLayout
    pnlLeft.setLayout(new BorderLayout());
    // 将聊天信息文本域填充至左边面板
    pnlLeft.add(txtMsg);
    // 将信息发送面板添加至左边面板的下方
    pnlLeft.add(pnlSend, BorderLayout.SOUTH);
    // 将文本框和按钮添加至信息发送面板
    pnlSend.add(txtSendMsg);
    pnlSend.add(btnSend);
    // 将个人信息图片添加至信息面板
    pnlInfo.add(lblInfo);
  }