Exemplo n.º 1
2
  AdminMain() {
    l = new JLabel();
    l.setBounds(10, 20, 1340, 1000);
    l.setBackground(Color.black);
    Font ft = new Font("Arial", Font.BOLD, 30);
    Font ft1 = new Font("Arial", Font.BOLD, 14);
    Font ft2 = new Font("Arial", Font.BOLD, 20);

    f1 = new Frame("Soft Test Management (Beta)");
    f1.setLayout(null);

    l1 = new Label("Test Instructions", l1.CENTER);
    l1.setBounds(10, 20, 1300, 60);
    l1.setForeground(Color.blue);
    l1.setBackground(Color.white);
    l1.setFont(ft);

    l2 = new JLabel("Deletion of Faculty/Students");
    l2.setBounds(20, 30, 1000, 500);
    l2.setBackground(Color.blue);
    l2.setFont(ft2);
    l3 = new JLabel("Test Pattern");
    l3.setBounds(20, 90, 1300, 500);
    l3.setBackground(Color.green);
    l3.setFont(ft2);

    b1 = new JButton("Go !");
    b1.setBounds(300, 220, 120, 30);
    b1.setBackground(Color.white);
    b1.setForeground(Color.blue);
    b1.setFont(ft2);

    b2 = new JButton("Go");
    b2.setBounds(300, 240, 120, 30);
    b2.setBackground(Color.white);
    b2.setForeground(Color.blue);
    b2.setFont(ft2);

    f1.add(l);
    l.add(l1);
    l2.add(b1);
    l.add(l2);
    l3.add(b2);
    l.add(l3);

    b1.addActionListener(this);
    b2.addActionListener(this);

    f1.setVisible(true);
    f1.setSize(1800, 800);
  }
Exemplo n.º 2
0
 /**
  * This method initializes jButtonLogout
  *
  * @return javax.swing.JButton
  */
 private JButton getJButtonLogout() {
   if (jButtonLogout == null) {
     jButtonLogout = new JButton();
     jButtonLogout.setText("Log Out");
     jButtonLogout.setFont(new Font("Arial", Font.BOLD, 12));
     jButtonLogout.setSelected(false);
     jButtonLogout.setMnemonic(KeyEvent.VK_UNDEFINED);
     jButtonLogout.setComponentOrientation(ComponentOrientation.UNKNOWN);
     jButtonLogout.setBounds(new Rectangle(8, 30, 80, 40));
     jButtonLogout.setForeground(Color.white);
     jButtonLogout.setFont(new Font("Arial", Font.BOLD, 12));
     jButtonLogout.setBackground(new Color(91, 155, 213));
     jButtonLogout.addActionListener(
         new java.awt.event.ActionListener() {
           public void actionPerformed(java.awt.event.ActionEvent e) {
             int option =
                 JOptionPane.showConfirmDialog(
                     myFrame, "Do You want to exit?", "Confirmation", JOptionPane.YES_NO_OPTION);
             if (option == JOptionPane.YES_OPTION) {
               JPanel panel = new LobbyLoginPanel(myFrame);
               myFrame.getContentPane().removeAll();
               myFrame.getContentPane().add(panel);
               myFrame.getContentPane().validate();
               myFrame.getContentPane().repaint();
             }
           }
         });
   }
   return jButtonLogout;
 }
Exemplo n.º 3
0
  public void go() throws Exception {
    if (!no_channel && !use_state) {
      channel.connect(groupname);
    }
    mainFrame = new JFrame();
    mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    panel = new DrawPanel(use_state);
    panel.setBackground(background_color);
    sub_panel = new JPanel();
    mainFrame.getContentPane().add("Center", panel);
    clear_button = new JButton("Clear");
    clear_button.setFont(default_font);
    clear_button.addActionListener(this);
    leave_button = new JButton("Leave");
    leave_button.setFont(default_font);
    leave_button.addActionListener(this);
    sub_panel.add("South", clear_button);
    sub_panel.add("South", leave_button);
    mainFrame.getContentPane().add("South", sub_panel);
    mainFrame.setBackground(background_color);
    clear_button.setForeground(Color.blue);
    leave_button.setForeground(Color.blue);
    mainFrame.pack();
    mainFrame.setLocation(15, 25);
    mainFrame.setBounds(new Rectangle(250, 250));

    if (!no_channel && use_state) {
      channel.connect(groupname, null, null, state_timeout);
    }
    mainFrame.setVisible(true);
    setTitle();
  }
  @SuppressWarnings("static-access")
  public void componentesListaUsuario() {
    dados = new Vector<String>();
    dados.add("Código");
    dados.add("Nome do Serviço");
    dados.add("Valor");
    dtmListaTipoServico = new DefaultTableModel();
    dtmListaTipoServico.setColumnIdentifiers(dados);
    jttListaTipoServico = new JTable();
    jttListaTipoServico.setFont(new Font("Tahoma", Font.PLAIN, 12));
    jttListaTipoServico.setModel(dtmListaTipoServico);
    jttListaTipoServico.getColumnModel().getColumn(0).setResizable(false);
    jttListaTipoServico.getColumnModel().getColumn(0).setPreferredWidth(60);
    jttListaTipoServico.getColumnModel().getColumn(1).setResizable(false);
    jttListaTipoServico.getColumnModel().getColumn(1).setPreferredWidth(337);
    jttListaTipoServico.getColumnModel().getColumn(2).setResizable(false);
    jttListaTipoServico.getColumnModel().getColumn(2).setPreferredWidth(100);
    jspListaTipoServico = new JScrollPane(jttListaTipoServico);
    jttListaTipoServico.setAutoResizeMode(jttListaTipoServico.AUTO_RESIZE_OFF);
    jspListaTipoServico.setBounds(10, 10, 500, 300);
    jpnListaTipoServico.add(jspListaTipoServico);

    jbtSelecionarTipoServico = new JButton("Selecionar");
    jbtSelecionarTipoServico.setFont(new Font("Tahoma", Font.PLAIN, 12));
    jbtSelecionarTipoServico.setBounds(10, 338, 110, 23);
    jpnListaTipoServico.add(jbtSelecionarTipoServico);

    jbtCancelarPesquisa = new JButton("Cancelar");
    jbtCancelarPesquisa.setFont(new Font("Tahoma", Font.PLAIN, 12));
    jbtCancelarPesquisa.setBounds(130, 339, 110, 23);
    jpnListaTipoServico.add(jbtCancelarPesquisa);
  }
Exemplo n.º 5
0
  public CalcPanel() {
    setPreferredSize(new Dimension(250, 105));
    lblNbr1.setPreferredSize(new Dimension(100, 20));
    lblNbr1.setFont(fontLabels);
    add(lblNbr1);

    tfNbr1.setPreferredSize(new Dimension(100, 20));
    add(tfNbr1);

    lblNbr2.setPreferredSize(new Dimension(100, 20));
    lblNbr2.setFont(fontLabels);
    add(lblNbr2);

    tfNbr2.setPreferredSize(new Dimension(100, 20));
    add(tfNbr2);

    btnAdd.setPreferredSize(new Dimension(100, 20));
    btnAdd.setFont(fontButtons);
    add(btnAdd);

    btnSubtract.setPreferredSize(new Dimension(100, 20));
    btnSubtract.setFont(fontButtons);
    add(btnSubtract);

    lblResult.setPreferredSize(new Dimension(200, 20));
    lblResult.setFont(fontLabels);
    add(lblResult);

    btnAdd.addActionListener(this);
    btnSubtract.addActionListener(this);
  }
Exemplo n.º 6
0
  /** Initializes the button. */
  private void initButtons() {
    final IconManager iconManager = serviceRegistrar.getService(IconManager.class);

    // Create Float / Dock Button
    floatButton = new JButton(ICON_SQUARE_O);
    floatButton.setToolTipText(TOOL_TIP_FLOAT);
    CytoPanelUtil.styleButton(floatButton);
    floatButton.setFont(iconManager.getIconFont(12));
    floatButton.setSelected(true);

    // Create close button
    closeButton = new JButton(ICON_REMOVE);
    closeButton.setToolTipText(TOOL_TIP_CLOSE);
    CytoPanelUtil.styleButton(closeButton);
    closeButton.setFont(iconManager.getIconFont(13));
    closeButton.setSelected(true);

    floatButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            if (isFloating()) DockCytoPanel();
            else FloatCytoPanel();

            notifyListeners(NOTIFICATION_STATE_CHANGE);
          }
        });

    closeButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            setState(CytoPanelState.HIDE);
            notifyListeners(NOTIFICATION_STATE_CHANGE);
          }
        });
  }
Exemplo n.º 7
0
  /*
   * 初始化窗口变量
   */
  public void initframe() {
    flogin.setTitle("欢迎来到江西农业大学");
    userName = new JLabel("用户名:");
    userName.setForeground(Color.white);
    userName.setFont(new Font("宋体", Font.BOLD, 15));
    userPassword = new JLabel("密  码:");
    userPassword.setForeground(Color.white);
    userPassword.setFont(new Font("宋体", Font.BOLD, 15));
    passWd = new JPasswordField(12);
    user = new JTextField(12);
    signIn = new JButton("登录");
    signIn.setFont(new Font("宋体", Font.BOLD, 15));
    signIn.setBackground(new Color(10, 97, 190));

    signIn.setForeground(Color.white);
    reset = new JButton("重置");
    reset.setBackground(Color.blue);
    reset.setForeground(Color.white);
    reset.setFont(new Font("宋体", Font.BOLD, 15));
    reset.setBackground(new Color(10, 97, 190));
    checkno = new JLabel("验证码:");
    checkno.setForeground(Color.white);
    checkno.setFont(new Font("宋体", Font.BOLD, 15));
    checktflogin = new JTextField(12);
  }
Exemplo n.º 8
0
  public ViewOperateUI(MainUIService main) {
    setLayout(null);
    m = main;
    this.setBounds(0, 0, 850, 700);
    this.setBackground(Color.WHITE);
    Font font2 = new Font("楷体", Font.BOLD, 18);

    JLabel title = new JLabel("经 营 状 态 表");
    title.setBounds(320, 30, 200, 40);
    title.setFont(font2);
    this.add(title);

    tabpane = new JTabbedPane(JTabbedPane.TOP);
    initPanelList();
    tabpane.setBounds(50, 80, tablewidth, tableheight);
    this.add(tabpane);

    Listener listen = new Listener();

    excel = new JButton("导出到Excel");
    excel.setBounds(250, 620, 150, 40);
    excel.setVisible(true);
    excel.setFont(new Font("隶书", Font.PLAIN, 20));
    excel.addMouseListener(listen);
    this.add(excel);

    exit = new JButton("返回");
    exit.setBounds(430, 620, 150, 40);
    exit.setVisible(true);
    exit.setFont(new Font("隶书", Font.PLAIN, 20));
    exit.addMouseListener(listen);
    this.add(exit);
  }
Exemplo n.º 9
0
  public LoginFrame(String s) {
    super(s);
    map = Apriori.test();
    Container container = getContentPane();
    container.setLayout(new GridLayout(3, 1));
    JPanel bJPanel = new JPanel();
    bJPanel.setLayout(new BorderLayout());
    JLabel name = new JLabel("                        电商用户行为分析");
    name.setFont(new Font("Dialog", 1, 35));
    bJPanel.add(name, BorderLayout.CENTER);

    JPanel aJPanel = new JPanel();
    aJPanel.setLayout(null);
    comment = new JButton("评论行为");
    comment.setFont(new Font("Dialog", 0, 20));
    comment.setBounds(265, 30, 240, 40);
    aJPanel.add(comment);
    comment.addActionListener(this);

    JPanel cJPanel = new JPanel();
    cJPanel.setLayout(null);
    buy = new JButton("购买行为");
    buy.setFont(new Font("Dialog", 0, 20));
    buy.setBounds(265, 30, 240, 40);
    cJPanel.add(buy);
    buy.addActionListener(this);

    container.add(bJPanel);
    container.add(aJPanel);
    container.add(cJPanel);
  }
  public SurrenderUI() {
    setType(Type.UTILITY);

    ExitB = new JButton("Exit");
    ExitB.setFont(new Font("Tahoma", Font.BOLD, 12));
    ExitB.setBackground(new Color(255, 215, 0));
    ExitB.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            dispose();
            new HSmain();
          }
        });
    ExitB.setBounds(461, 427, 296, 60);

    setTitle("Surrendering a Pet");
    Container pane = getContentPane();
    getContentPane().setLayout(null);
    pane.add(ExitB);

    txtSurrender = new JTextField();
    txtSurrender.setEditable(false);
    txtSurrender.setForeground(new Color(0, 0, 0));
    txtSurrender.setBackground(new Color(255, 215, 0));
    txtSurrender.setBounds(10, 11, 764, 50);
    txtSurrender.setHorizontalAlignment(SwingConstants.CENTER);
    txtSurrender.setFont(new Font("Lucida Handwriting", Font.BOLD, 18));
    txtSurrender.setText("Surrendering a Pet");
    getContentPane().add(txtSurrender);
    txtSurrender.setColumns(10);

    BackB = new JButton("Back");
    BackB.setFont(new Font("Tahoma", Font.BOLD, 12));
    BackB.setBackground(new Color(255, 215, 0));
    BackB.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            new AnimalServiceUI();
            dispose();
          }
        });
    BackB.setBounds(26, 427, 320, 60);
    getContentPane().add(BackB);

    scrollPane = new JScrollPane();
    scrollPane.setBounds(0, 72, 764, 329);
    getContentPane().add(scrollPane);

    JTextPane txtSurrenderInfo = new JTextPane();
    scrollPane.setViewportView(txtSurrenderInfo);
    txtSurrenderInfo.setForeground(new Color(0, 0, 0));
    txtSurrenderInfo.setEditable(false);
    txtSurrenderInfo.setFont(new Font("Times New Roman", Font.BOLD, 15));
    txtSurrenderInfo.setText(
        "\tThe Humane Society of Lamar cannot accept every animal brought to our shelter immediately. \r\nWe respect the difficult decision of owners to relinquish their pets, and the hard choices of those \r\ngood citizens who are trying to help a stray. We accept the surrender of pets as space allows. \r\nWe maintain a waiting list for all animals needing to be admitted to the shelter.\r\nAnimals are surrendered to our facility by appointment.\r\nWe admit at least 12 animals per week. We accept more animals as adoptions and space allow.\r\nNote that we cannot accept aggressive, sick or pregnant animals.\r\nPlease call 409-225-7981, and one of our adoption specialists will speak to you.\r\nAt times our waiting list will have up to 100 animals waiting for admission and it can take several weeks \r\nbefore we can admit your pet.\r\nPlease understand that our primary goal is to place as many animals in forever homes as possible, \r\ntherefore we must give every pet admitted to the shelter enough time to find a loving home. \r\nWe cannot guarantee placement of every animal admitted to the shelter.\r\n\t\r\n\tAdmission of any animal into the Humane Society of Lamar  is based on the animal\u2019s health, \r\nbehavior, and adoptability. When you bring your pets, please have:\r\n\r\n    *Any veterinary records\r\n    *Your pet\u2019s medications\r\n    *Special food or treats that your pet needs\r\n    *Your pet\u2019s bed, toys, leash and other belongings from home\r\n\r\nA staff member will evaluate the temperament of your pet. Once your pet has been screened, \r\nand the Humane Society of Lamar decides to accept your pet, we ask a donation to our shelter to be made. \r\nThis is not required, but will greatly help us care for your pet.");

    setSize(800, 553);
    setVisible(true);
    setDefaultCloseOperation(EXIT_ON_CLOSE);
  }
Exemplo n.º 11
0
  private void JButtonInit() {
    // Reserva de memoria para los JButton.
    OkButton = new JButton();
    CancelButton = new JButton();

    // Establecimiento del tama�o, textos y tipo de letra para OkButton.
    OkButton.setBounds(new Rectangle(195, 115, 100, 30));
    OkButton.setText("Ok");
    OkButton.setFont(new java.awt.Font("Button", 1, 12));

    // Establecimiento de la funcionalidad de OkButton.
    OkButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            OkButtonActionPerformed(e);
          }
        });

    // Establecimiento del tama�o, texto y tipo de letra para CancelButton.
    CancelButton.setBounds(new Rectangle(310, 115, 100, 30));
    CancelButton.setText("Cancel");
    CancelButton.setFont(new java.awt.Font("Button", 1, 12));

    // Establecimiento de la funcionalidad de CancelButton.
    CancelButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            CancelButtonActionPerformed(e);
          }
        });
  }
Exemplo n.º 12
0
  // Create small Pits in board
  private JPanel centerBoardPanel() {
    JPanel centerPanel = new JPanel(new GridLayout(2, 6, 20, 100));
    centerPanel.setOpaque(false);

    /*Initialize/Create buttons Array */
    buttons = new JButton[SMALL_PIT_COUNT];

    for (int i = 0; i < SMALL_PIT_COUNT; i++) {
      if (i < SMALL_PIT_COUNT / 2) {
        JButton b = new JButton(String.valueOf(game.board.getPitAt(i).getCount()));
        b.setFont(new Font("Belta Regular", Font.BOLD, 32));
        b.addActionListener(new ButtonListener());
        buttons[i] = b;
      } else {
        JButton b = new JButton(String.valueOf(game.board.getPitAt(i + 1).getCount()));
        b.setFont(new Font("Belta Regular", Font.BOLD, 32));
        b.addActionListener(new ButtonListener());
        buttons[i] = b;
      }
    }

    for (int i = SMALL_PIT_COUNT - 1; i >= 6; i--) {
      buttons[i].setBackground(new Color(214, 162, 173));
      centerPanel.add(buttons[i]);
    }

    for (int j = 0; j < SMALL_PIT_COUNT / 2; j++) {
      buttons[j].setBackground(new Color(214, 162, 173));
      centerPanel.add(buttons[j]);
    }

    return centerPanel;
  }
Exemplo n.º 13
0
  /**
   * Init JWhiteBoard interface
   *
   * @throws Exception
   */
  public void go() throws Exception {
    if (!noChannel && !useState) channel.connect(groupName);
    mainFrame = new JFrame();
    mainFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    drawPanel = new DrawPanel(useState);
    drawPanel.setBackground(backgroundColor);
    subPanel = new JPanel();
    mainFrame.getContentPane().add("Center", drawPanel);
    clearButton = new JButton("Clean");
    clearButton.setFont(defaultFont);
    clearButton.addActionListener(this);
    leaveButton = new JButton("Exit");
    leaveButton.setFont(defaultFont);
    leaveButton.addActionListener(this);
    subPanel.add("South", clearButton);
    subPanel.add("South", leaveButton);
    mainFrame.getContentPane().add("South", subPanel);
    mainFrame.setBackground(backgroundColor);
    clearButton.setForeground(Color.blue);
    leaveButton.setForeground(Color.blue);
    mainFrame.pack();
    mainFrame.setLocation(15, 25);
    mainFrame.setBounds(new Rectangle(250, 250));

    if (!noChannel && useState) {
      channel.connect(groupName, null, stateTimeout);
    }
    mainFrame.setVisible(true);
  }
Exemplo n.º 14
0
  /**
   * @param doc
   * @return
   */
  private JPanel createForwardBackPanel(Document doc) {
    JPanel panel = new JPanel();
    JButton prev = new JButton("Prev");
    prev.setFont(font);
    prev.addActionListener(
        new ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent e) {
            previousFile();
          };
        });
    JButton next = new JButton("Next");
    next.setFont(font);
    next.addActionListener(
        new ActionListener() {

          public void actionPerformed(java.awt.event.ActionEvent e) {
            nextFile();
          };
        });
    fileNameField = new JTextField(doc.getDocumentId());
    fileNameField.setEditable(false);
    fileNameField.setFont(font);

    panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));
    panel.add(prev);
    panel.add(Box.createHorizontalGlue());
    panel.add(fileNameField);
    panel.add(Box.createHorizontalGlue());
    panel.add(next);
    return panel;
  }
Exemplo n.º 15
0
  /**
   * Constructor
   *
   * @param aFrame
   */
  public RenameWindow(Frame aFrame) {

    super(aFrame, true);
    setTitle2("Enter a new name");
    setTitle("Rename");
    setBounds(100, 100, 416, 275);

    final JPanel centerPanel = new JPanel();
    centerPanel.setBackground(Color.WHITE);
    final GridBagLayout gridBagLayout = new GridBagLayout();
    gridBagLayout.rowHeights = new int[] {0, 7, 7};
    centerPanel.setLayout(gridBagLayout);
    getContentPane().add(centerPanel, BorderLayout.CENTER);

    newName_ = new JTextField();
    newName_.setRequestFocusEnabled(false);
    newName_.setColumns(26);
    final GridBagConstraints gridBagConstraints = new GridBagConstraints();
    gridBagConstraints.gridy = 0;
    gridBagConstraints.gridx = 0;
    centerPanel.add(newName_, gridBagConstraints);

    setLocationRelativeTo(aFrame);

    final Component component = Box.createVerticalStrut(5);
    final GridBagConstraints gridBagConstraints_2 = new GridBagConstraints();
    gridBagConstraints_2.gridy = 1;
    gridBagConstraints_2.gridx = 0;
    centerPanel.add(component, gridBagConstraints_2);

    final JPanel actionPanel = new JPanel();
    actionPanel.setBackground(Color.WHITE);
    final FlowLayout flowLayout_1 = new FlowLayout();
    actionPanel.setLayout(flowLayout_1);
    final GridBagConstraints gridBagConstraints_1 = new GridBagConstraints();
    gridBagConstraints_1.gridy = 2;
    gridBagConstraints_1.gridx = 0;
    centerPanel.add(actionPanel, gridBagConstraints_1);

    applyButton = new JButton();
    applyButton.setMnemonic(KeyEvent.VK_A);
    applyButton.setSelected(true);
    applyButton.setFont(new Font("Sans", Font.PLAIN, 12));
    applyButton.setText("Apply");
    actionPanel.add(applyButton);

    final Component component_1 = Box.createHorizontalStrut(2);
    actionPanel.add(component_1);

    cancelButton = new JButton();
    cancelButton.setMnemonic(KeyEvent.VK_C);
    cancelButton.setFont(new Font("Sans", Font.PLAIN, 12));
    cancelButton.setText("Cancel");
    actionPanel.add(cancelButton);

    //		GnwGuiSettings settings = GnwGuiSettings.getInstance();
    //		applyButton.setIcon(new ImageIcon(settings.getApplyIconPath()));
    //		cancelButton.setIcon(new ImageIcon(settings.getCancelIconPath()));
  }
Exemplo n.º 16
0
  /** Create the panel for Welcome. */
  public Welcome() {
    setBackground(Color.YELLOW);
    setSize(648, 445);
    setLayout(null);

    // Creating labels, buttons, textFields and adding attributes

    JLabel snakeIcon = new JLabel("");
    snakeIcon.setBounds(400, 142, 242, 261);
    Image img1 = new ImageIcon(this.getClass().getResource("/img/snake-icon.png")).getImage();
    snakeIcon.setIcon(new ImageIcon(img1));
    add(snakeIcon);

    lblWelcome = new JLabel("Welcome to Snake-Emulator");
    lblWelcome.setFont(new Font("Lucida Grande", Font.BOLD | Font.ITALIC, 35));
    lblWelcome.setBounds(68, 70, 522, 44);
    add(lblWelcome);

    lblUsername = new JLabel("Username:"******"Lucida Grande", Font.PLAIN, 18));
    lblUsername.setBounds(126, 163, 98, 24);
    add(lblUsername);

    lblPassword = new JLabel("Password:"******"Lucida Grande", Font.PLAIN, 18));
    lblPassword.setBounds(126, 210, 98, 24);
    add(lblPassword);

    textFieldUsername = new JTextField();
    textFieldUsername.setFont(new Font("Lucida Grande", Font.PLAIN, 18));
    textFieldUsername.setBounds(226, 161, 174, 28);
    add(textFieldUsername);
    textFieldUsername.setColumns(10);

    passwordField = new JPasswordField();
    passwordField.setFont(new Font("Lucida Grande", Font.PLAIN, 18));
    passwordField.setBounds(226, 208, 174, 28);
    add(passwordField);

    btnLogin = new JButton("Login");
    btnLogin.setFont(new Font("Lucida Grande", Font.PLAIN, 18));
    btnLogin.setBounds(255, 248, 138, 36);
    add(btnLogin);

    lblDontHaveA = new JLabel("Don't have a user?");
    lblDontHaveA.setFont(new Font("Lucida Grande", Font.PLAIN, 18));
    lblDontHaveA.setBounds(78, 332, 164, 36);
    add(lblDontHaveA);

    btnSignUp = new JButton("Sign Up Here!");
    btnSignUp.setFont(new Font("Lucida Grande", Font.PLAIN, 18));
    btnSignUp.setBounds(243, 332, 164, 36);
    add(btnSignUp);

    lblYouHaveEntered = new JLabel("");
    lblYouHaveEntered.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
    add(lblYouHaveEntered);
  }
Exemplo n.º 17
0
 /**
  * Create a JButton with the given command. The text value for the JButton is set to the command.
  *
  * @param command The String value of the command that the button should represent.
  * @return JButton The button with the text value of the given command.
  */
 private JButton getButtonFor(String command) {
   JButton button = new JButton(command);
   button.addActionListener(this);
   if (command.length() < 3) button.setFont(CalculatorView.DEFAULT_FONT);
   else button.setFont(CalculatorView.SMALL_FONT);
   button.setPreferredSize(new Dimension(110, 60));
   button.setFocusPainted(false);
   return button;
 }
Exemplo n.º 18
0
  public Perfil() {
    super.setBounds(181, 61, 700, 538); // (ancho,alto)
    super.setLayout(null);
    super.setOpaque(false);
    super.setVisible(false);

    try {
      UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (Exception ex) {
      ex.printStackTrace();
    }

    jbtnGuardar = new JButton("Guardar Cambios");
    jbtnGuardar.setBounds(55, 457, 150, 40);
    jbtnGuardar.addActionListener(this);
    jbtnGuardar.setBorder(null);
    jbtnGuardar.setBackground(new Color(0, 154, 225));
    jbtnGuardar.setForeground(Color.WHITE);
    jbtnGuardar.setFont(new Font("Segoe UI", Font.PLAIN, 14));
    jbtnGuardar.setCursor(new Cursor(java.awt.Cursor.HAND_CURSOR));
    jbtnGuardar.setFocusPainted(false);
    this.add(jbtnGuardar);

    nombre = new JLabel("Ninguna imagen seleccionada");
    nombre.setBounds(210, 250, 200, 40);
    nombre.setForeground(Color.GRAY);
    this.add(nombre);

    jbtnCargarI = new JButton("Cargar imagen");
    jbtnCargarI.setBounds(55, 250, 150, 40);
    jbtnCargarI.addActionListener(this);
    jbtnCargarI.setBorder(null);
    jbtnCargarI.setBackground(new Color(0, 154, 225));
    jbtnCargarI.setForeground(Color.WHITE);
    jbtnCargarI.setFont(new Font("Segoe UI", Font.PLAIN, 14));
    jbtnCargarI.setCursor(new Cursor(java.awt.Cursor.HAND_CURSOR));
    jbtnCargarI.setFocusPainted(false);
    this.add(jbtnCargarI);

    jbtnQuitarI = new JButton("Quitar imagen");
    jbtnQuitarI.setBounds(55, 186, 150, 40);
    jbtnQuitarI.addActionListener(this);
    jbtnQuitarI.setBorder(null);
    jbtnQuitarI.setBackground(new Color(0, 154, 225));
    jbtnQuitarI.setForeground(Color.WHITE);
    jbtnQuitarI.setFont(new Font("Segoe UI", Font.PLAIN, 14));
    jbtnQuitarI.setCursor(new Cursor(java.awt.Cursor.HAND_CURSOR));
    jbtnQuitarI.setFocusPainted(false);
    this.add(jbtnQuitarI);

    jlbimage = new JLabel();
    jlbimage.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1));
    jlbimage.setBounds(55, 46, 150, 150);
    this.add(jlbimage);

    this.repaint();
  }
Exemplo n.º 19
0
  /** 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);
  }
Exemplo n.º 20
0
  /** Initialize the contents of the frame. */
  private void initialize() {
    frame = new JFrame();
    frame.setBounds(100, 100, 450, 300);
    frame.setVisible(true);
    frame.setResizable(false);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().setLayout(null);

    JButton btnCustomer = new JButton("Customer");
    btnCustomer.setFont(new Font("Tahoma", Font.BOLD, 16));
    btnCustomer.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            JOptionPane.showMessageDialog(null, "Welcome to Coffee Kiosk ");
            // Coffee1 nw = new Coffee1();
            // nw.NewScreen();
            cust = cust + 1;
            Customer cs = new Customer();
            cs.CustomerScreen();
          }
        });
    btnCustomer.setBounds(83, 94, 117, 86);
    frame.getContentPane().add(btnCustomer);

    JButton btnAdmin = new JButton("Admin");
    btnAdmin.setFont(new Font("Tahoma", Font.BOLD, 16));
    btnAdmin.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            JOptionPane.showMessageDialog(null, "Welcome Admin ");
            Login ls = new Login();
            ls.LoginScreen();
          }
        });

    btnAdmin.setBounds(229, 94, 117, 86);
    frame.getContentPane().add(btnAdmin);

    JButton btnExit = new JButton("EXIT");
    btnExit.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            JOptionPane.showMessageDialog(null, "Thank You for using Coffee Kiosk");
            System.exit(0);
          }
        });
    btnExit.setBounds(168, 207, 89, 23);
    frame.getContentPane().add(btnExit);

    JLabel lblLeedsCoffeeKiosk = new JLabel("LEEDS COFFEE KIOSK");
    lblLeedsCoffeeKiosk.setHorizontalAlignment(SwingConstants.CENTER);
    lblLeedsCoffeeKiosk.setFont(new Font("Times New Roman", Font.BOLD | Font.ITALIC, 30));
    lblLeedsCoffeeKiosk.setForeground(new Color(148, 0, 211));
    lblLeedsCoffeeKiosk.setBounds(36, 11, 366, 72);
    frame.getContentPane().add(lblLeedsCoffeeKiosk);
  }
Exemplo n.º 21
0
  private void initComponents() {

    panel = new JPanel();
    panel.setBorder(new TitledBorder("Search users"));
    panel.setBounds(10, 10, 360, 170);
    panel.setLayout(null);

    jMessage = new javax.swing.JLabel();
    jMessage.setFont(new java.awt.Font("Comic Sans MS", 0, 16)); // NOI18N
    this.add(jMessage);
    jMessage.setBounds(40, 90, 150, 30);
    jMessage.setText("");

    backButton = new javax.swing.JButton();
    backButton.setFont(new java.awt.Font("Comic Sans MS", 0, 13)); // NOI18N
    backButton.setText("Back");
    panel.add(backButton);
    backButton.setBounds(270, 120, 80, 30); // 310 300 80 30
    backButton.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            backButtonActionPerformed(evt);
          }
        });

    searchCheckBox = new JCheckBox("Use regular expressions");
    panel.add(searchCheckBox);
    searchCheckBox.setBounds(30, 60, 250, 30);
    searchCheckBox.addItemListener(
        new ItemListener() {
          public void itemStateChanged(ItemEvent e) {
            searchCheckBoxPerformed(e);
          }
        });

    okButton = new JButton();
    okButton.setFont(new java.awt.Font("Comic Sans MS", 0, 13));
    okButton.setText("OK");
    panel.add(okButton);
    okButton.setBounds(140, 120, 80, 30);
    okButton.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent e) {
            okButtonActionPerfomed(e);
          }
        });

    // TextFields
    tfsearch = new JTextField();
    tfsearch.setFont(new java.awt.Font("Comic Sans MS", 0, 13));
    panel.add(tfsearch);
    tfsearch.setBounds(30, 30, 300, 30);

    add(panel);
  }
  public ClienteVista() {
    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    setIconImage(
        Toolkit.getDefaultToolkit()
            .getImage(ClienteVista.class.getResource("/Iconos/pizza_1.PNG")));
    setTitle(" Cliente");
    setResizable(false);
    setBounds(100, 100, 495, 430);
    contentPane = new JPanel();
    contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
    setContentPane(contentPane);
    contentPane.setLayout(null);
    this.setLocationRelativeTo(null);

    JLabel lblClientes = new JLabel("Clientes:");
    lblClientes.setFont(new Font("Tahoma", Font.BOLD, 11));
    lblClientes.setBounds(10, 11, 96, 25);
    contentPane.add(lblClientes);

    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setBounds(10, 38, 318, 349);
    contentPane.add(scrollPane);

    this.modelTable = new WDefaultTableModel(null, this.nombreColumna);

    table = new WTable(this.modelTable);
    scrollPane.setViewportView(table);
    table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    btnCrear = new JButton(" Crear");
    btnCrear.setIcon(new ImageIcon(ClienteVista.class.getResource("/Iconos/Agregar.png")));
    btnCrear.setFont(new Font("Tahoma", Font.BOLD, 11));
    btnCrear.setBounds(338, 36, 140, 40);
    contentPane.add(btnCrear);

    btnModificar = new JButton(" Modificar");
    btnModificar.setIcon(new ImageIcon(ClienteVista.class.getResource("/Iconos/modificar.png")));
    btnModificar.setFont(new Font("Tahoma", Font.BOLD, 11));
    btnModificar.setBounds(338, 87, 140, 40);
    contentPane.add(btnModificar);

    btnVolver = new JButton(" Volver");
    btnVolver.setIcon(new ImageIcon(ClienteVista.class.getResource("/Iconos/Volver.png")));
    btnVolver.setFont(new Font("Tahoma", Font.BOLD, 11));
    btnVolver.setBounds(338, 347, 140, 40);
    contentPane.add(btnVolver);

    lblNewLabel = new JLabel("");
    lblNewLabel.setIcon(
        new ImageIcon(ClienteVista.class.getResource("/Iconos/Logo Pizzeria Wild 96x96.png")));
    lblNewLabel.setBounds(366, 171, 96, 105);
    contentPane.add(lblNewLabel);
  }
Exemplo n.º 23
0
  // добавление кнопок(0,1,2,3,4,5,6,7,8,9,*,#)
  public JPanel addNumberButtons(JTextField DispField) {
    final JTextField Field = DispField;
    JPanel ButtonPanel = new JPanel();
    ButtonPanel.setLayout(new GridLayout(4, 3));
    ButtonPanel.setPreferredSize(new Dimension(500, 320));
    ButtonPanel.setMaximumSize(new Dimension(500, 500));

    JButton[] NumButtons = new JButton[10];
    JButton StarButtons = new JButton("*");
    StarButtons.setFont(NumButtonsFont);
    StarButtons.setPreferredSize(new Dimension(100, 75));
    StarButtons.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent ev) {
            if (Field.getText().length() < MaxChars) Field.setText(Field.getText() + "*");
            if (!MainFrame.RedirectPanel.isVisible()) CallButton.setEnabled(true);
          }
        });
    JButton latticeButtons = new JButton("#");
    latticeButtons.setFont(NumButtonsFont);
    latticeButtons.setPreferredSize(new Dimension(100, 75));
    latticeButtons.addActionListener(
        new ActionListener() {
          public void actionPerformed(ActionEvent ev) {
            if (Field.getText().length() < MaxChars) Field.setText(Field.getText() + "#");
            if (!MainFrame.RedirectPanel.isVisible()) CallButton.setEnabled(true);
          }
        });

    for (int i = 0; i < 10; i++) {
      final String name = "" + i;
      NumButtons[i] = new JButton("" + i);
      NumButtons[i].setFont(NumButtonsFont);
      NumButtons[i].setPreferredSize(new Dimension(100, 75));
      NumButtons[i].addActionListener(
          new ActionListener() {
            public void actionPerformed(ActionEvent ev) {
              if (Field.getText().length() < MaxChars) Field.setText(Field.getText() + name);
              if (!MainFrame.RedirectPanel.isVisible()) CallButton.setEnabled(true);
            }
          });
    }

    for (int i = 1; i <= 9; i++) {
      ButtonPanel.add(NumButtons[i]);
    }
    ButtonPanel.add(StarButtons);
    ButtonPanel.add(NumButtons[0]);
    ButtonPanel.add(latticeButtons);

    return ButtonPanel;
  }
Exemplo n.º 24
0
 @Override
 public void setFont(final Font font) {
   super.setFont(font);
   if (cboDisplayType == null) {
     return;
   }
   cboDisplayType.setFont(font);
   cmdSave.setFont(font);
   cmdUnzoom.setFont(font);
   cmdResetView.setFont(font);
   cmdMaximize.setFont(font);
   spnBins.setFont(font);
   lblBins.setFont(font);
 }
Exemplo n.º 25
0
  public Login() {

    Image titleImage = Toolkit.getDefaultToolkit().getImage("logo.jpg");
    con = getContentPane();
    setDefaultCloseOperation(EXIT_ON_CLOSE);
    setTitle("Brain Tumor Segmentation");
    setBounds(125, 50, 800, 600);
    setIconImage(titleImage);
    con.setLayout(null);
    con.add(panel);
    panel.setLayout(null);
    panel.setBounds(15, 10, 760, 540);
    panel.setBorder(new TitledBorder("Login Page"));
    panel.setBackground(Color.lightGray);

    panel.add(index);
    panel.add(userid);
    panel.add(password);
    panel.add(useridTxt);
    panel.add(passwordTxt);
    panel.add(submit);
    panel.add(exit);

    Font font = new Font("Bookman Old Style", 1, 15);

    index.setBounds(260, 50, 350, 30);
    userid.setBounds(250, 125, 125, 30);
    useridTxt.setBounds(400, 125, 125, 30);
    password.setBounds(250, 200, 175, 30);
    passwordTxt.setBounds(400, 200, 125, 30);
    submit.setBounds(275, 300, 125, 50);
    exit.setBounds(425, 300, 125, 50);

    index.setFont(new Font("Bookman Old Style", 1, 18));
    userid.setFont(font);
    useridTxt.setFont(font);
    password.setFont(font);
    passwordTxt.setFont(font);
    submit.setFont(font);
    exit.setFont(font);

    submit.setBorder(BorderFactory.createLineBorder(Color.black, 5));
    exit.setBorder(BorderFactory.createLineBorder(Color.black, 5));
    setVisible(true);

    submit.addActionListener(this);
    exit.addActionListener(this);
  }
Exemplo n.º 26
0
  protected void initializeZoomSlider() {
    zoomSlider = new JSlider(MIN_ZOOM, tileController.getTileSource().getMaxZoom());
    zoomSlider.setOrientation(JSlider.VERTICAL);
    zoomSlider.setBounds(10, 10, 30, 150);
    zoomSlider.setOpaque(false);
    zoomSlider.addChangeListener(
        new ChangeListener() {
          public void stateChanged(ChangeEvent e) {
            setZoom(zoomSlider.getValue());
          }
        });
    add(zoomSlider);
    int size = 18;
    try {
      ImageIcon icon = new ImageIcon(getClass().getResource("images/plus.png"));
      zoomInButton = new JButton(icon);
    } catch (Exception e) {
      zoomInButton = new JButton("+");
      zoomInButton.setFont(new Font("sansserif", Font.BOLD, 9));
      zoomInButton.setMargin(new Insets(0, 0, 0, 0));
    }
    zoomInButton.setBounds(4, 155, size, size);
    zoomInButton.addActionListener(
        new ActionListener() {

          public void actionPerformed(ActionEvent e) {
            zoomIn();
          }
        });
    add(zoomInButton);
    try {
      ImageIcon icon = new ImageIcon(getClass().getResource("images/minus.png"));
      zoomOutButton = new JButton(icon);
    } catch (Exception e) {
      zoomOutButton = new JButton("-");
      zoomOutButton.setFont(new Font("sansserif", Font.BOLD, 9));
      zoomOutButton.setMargin(new Insets(0, 0, 0, 0));
    }
    zoomOutButton.setBounds(8 + size, 155, size, size);
    zoomOutButton.addActionListener(
        new ActionListener() {

          public void actionPerformed(ActionEvent e) {
            zoomOut();
          }
        });
    add(zoomOutButton);
  }
Exemplo n.º 27
0
  public ManagerDeleteUser() {
    mm = new ManagerModel();
    Font f = new Font("ºÚÌå", Font.BOLD, 16);
    Container ct = this.getContentPane();
    ct.setLayout(null);
    jl1 = new JLabel("ɾ³ýµÄÓû§Ãû");
    jl1.setBounds(60, 150, 150, 30);
    jl1.setFont(f);
    jl1.setForeground(Color.black);
    ct.add(jl1);

    jtf = new JTextField();
    jtf.setBounds(170, 150, 130, 30);
    jtf.setBorder(BorderFactory.createLoweredBevelBorder());
    ct.add(jtf);

    jl2 = new JLabel("¹ÜÀíÔ±ÃÜÂë");
    jl2.setBounds(60, 190, 150, 30);
    jl2.setFont(f);
    jl2.setForeground(Color.black);
    ct.add(jl2);

    jpf = new JPasswordField(20);
    jpf.setBounds(170, 190, 130, 30);
    jpf.setBorder(BorderFactory.createLoweredBevelBorder());
    ct.add(jpf);

    jcon = new JButton("ɾ³ý");
    jcon.addActionListener(this);
    jcon.setFont(f);
    jcon.setBounds(60, 300, 70, 30);
    ct.add(jcon);

    jcancel = new JButton("È¡Ïû");
    jcancel.addActionListener(this);
    jcancel.setFont(f);
    jcancel.setBounds(240, 300, 70, 30);
    ct.add(jcancel);

    BackImage bi = new BackImage("IndexPic.jpg");
    bi.setBounds(0, 0, 360, 360);
    ct.add(bi);

    this.setUndecorated(true);
    this.setSize(360, 360);
    this.setLocationRelativeTo(null);
    this.setVisible(true);
  }
Exemplo n.º 28
0
 private void addButton(Container parent, int x, int y, int[][] z, int[] k, Window l) {
   JButton but = new JButton();
   but.addActionListener(new Oper(x, y, z, k, l));
   but.setFont(f);
   // but.setActionCommand(name);
   parent.add(but);
 }
Exemplo n.º 29
0
  private void newComps() {
    ta = new JTextArea();
    // ta.setLineWrap(true);
    ta.setWrapStyleWord(true);
    ta.setFocusable(false);
    ta.setEditable(false);
    ta.setFont(new Font("Courier New", Font.BOLD, 20));
    ta.setBackground(Color.black);
    ta.setForeground(Color.GREEN);

    sc = new JScrollPane();
    sc.setViewportView(ta);

    btnExport = new JButton("Export");
    btnExport.setOpaque(false);
    btnExport.setFont(ta.getFont());
    btnExport.setFocusable(false);

    ckWrap = new JCheckBox("Wrap text");
    ckWrap.setOpaque(false);
    ckWrap.setForeground(Color.white);
    ckWrap.setFont(ta.getFont());
    ckWrap.setFocusable(false);

    chooser = new JFileChooser();
  }
Exemplo n.º 30
-1
 public JFrameComandi(Mediator mediator) {
   panelText = new JPanel();
   panelText.setLayout(new BorderLayout());
   panelText.setBackground(Color.white);
   panelButton = new JPanel();
   panelButton.setBackground(Color.white);
   dimensione = Toolkit.getDefaultToolkit().getScreenSize();
   setTitle("Comandi");
   txa = new JTextArea();
   txa.setEditable(false);
   txa.setText(text);
   txa.setFont(new Font("Ariel", Font.PLAIN, dimensione.height / 55));
   txa.setLineWrap(true);
   txa.setWrapStyleWord(true);
   ok = new JButton("ESCI");
   ok.setName("okComandi");
   ok.setFont(new Font("Ariel", Font.PLAIN, dimensione.height / 50));
   panelText.add(txa, BorderLayout.CENTER);
   panelButton.add(ok, BorderLayout.CENTER);
   mediator.manageEvent(new ActionEvent(ok, Counter.generateID(), null));
   pack();
   setResizable(false);
   setSize(new Dimension(dimensione.width / 3, dimensione.height / 3));
   add(panelText, BorderLayout.CENTER);
   add(panelButton, BorderLayout.SOUTH);
   setAlwaysOnTop(true);
   setLocationRelativeTo(null);
   setVisible(false);
   setDefaultCloseOperation(DISPOSE_ON_CLOSE);
 }