Ejemplo n.º 1
0
 @Override
 public void enableAllForms(boolean enable) {
   loginButton.setEnabled(enable);
   loginUsername.setEnabled(enable);
   loginPassword.setEnabled(enable);
   regButton.setEnabled(enable);
   regUsername.setEnabled(enable);
   regPass.setEnabled(enable);
   regRepPass.setEnabled(enable);
   regEmail.setEnabled(enable);
 }
Ejemplo n.º 2
0
  private void initUI() {
    setResizable(false);
    setTitle("Fyle - Login");
    setSize(600, 600);
    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    loginButton = new ButtonImpl("Login");
    regButton = new ButtonImpl("Register");
    loginUsername = new TextFieldImpl(12);
    loginUsername.setDocument(new TextFieldLimit(16));
    loginUsername.setMaximumSize(loginUsername.getPreferredSize());
    loginButton.setMaximumSize(loginButton.getPreferredSize());
    loginPassword = new PasswordFieldImpl(12);
    loginPassword.setDocument(new TextFieldLimit(128));
    loginPassword.setMaximumSize(loginPassword.getPreferredSize());
    regPass = new PasswordFieldImpl(12);
    regPass.setDocument(new TextFieldLimit(128));
    regPass.setMaximumSize(regPass.getPreferredSize());
    regRepPass = new PasswordFieldImpl(12);
    regRepPass.setDocument(new TextFieldLimit(128));
    regRepPass.setMaximumSize(regRepPass.getPreferredSize());
    regUsername = new TextFieldImpl(12);
    regUsername.setDocument(new TextFieldLimit(16));
    regUsername.setMaximumSize(regUsername.getPreferredSize());
    regEmail = new TextFieldImpl(12);
    regEmail.setDocument(new TextFieldLimit(254));
    regEmail.setMaximumSize(regEmail.getPreferredSize());
    logUserLabel = new JLabel("Username:"******"Password:"******"Password:"******"Repeat password:"******"Email:");
    regUserLabel = new JLabel("Username:"******"Status: ");
    statusLabel = new StatusLabelImpl("");
    JPanel statusPanel = new JPanel();
    statusPanel.setLayout(new FlowLayout(FlowLayout.LEFT));
    statusPanel.add(statustxtLabel);
    statusPanel.add(statusLabel);

    getContentPane().setLayout(new BoxLayout(getContentPane(), BoxLayout.Y_AXIS));
    add(formPanel);
    add(statusPanel);
    pack();
  }