Пример #1
0
  public LogonAppDemo() {

    super("LogonAppDemo window");
    setLayout(null); // added from the version 1.02 program
    name = "";
    password = "";

    addNotify();
    resize(insets().left + insets().right + 333, insets().top + insets().bottom + 222);
    nameField = new TextField(20);
    add(nameField);
    nameField.reshape(insets().left + 117, insets().top + 68, 167, 25);
    logonLabel = new Label("Identification and Logon");
    logonLabel.setFont(new Font("Helvetica", Font.BOLD, 14));
    add(logonLabel);
    logonLabel.reshape(insets().left + 72, insets().top + 23, 186, 18);
    nameLabel = new Label("Name:");
    nameLabel.setFont(new Font("Dialog", Font.BOLD, 12));
    add(nameLabel);
    nameLabel.reshape(insets().left + 39, insets().top + 73, 47, 18);
    passwordField = new TextField(20);
    add(passwordField);
    passwordField.reshape(insets().left + 117, insets().top + 107, 168, 25);
    OKButton = new Button("OK");
    OKButton.setFont(new Font("Dialog", Font.BOLD, 12));
    add(OKButton);
    OKButton.reshape(insets().left + 72, insets().top + 158, 75, 27);
    passwordLabel = new Label("Password:"******"Dialog", Font.BOLD, 12));
    add(passwordLabel);
    passwordLabel.reshape(insets().left + 39, insets().top + 112, 69, 16);
    cancelButton = new Button("Cancel");
    cancelButton.setFont(new Font("Dialog", Font.BOLD, 12));
    add(cancelButton);
    cancelButton.reshape(insets().left + 186, insets().top + 156, 75, 29);

    show();
  } // LogonAppDemo