Package javafx.scene.control

Examples of javafx.scene.control.TextField


  public void create(List<Object> args) {
    final TextArea results = (TextArea) args.get(0);
    final Main main = (Main) args.get(1);
    this.setSpacing(10);
    this.setPadding(new Insets(10, 10, 10, 10));
    TextField login = new TextField();
    login.setMaxWidth(200);
    login.setPromptText("Login");
    PasswordField pass = new PasswordField();
    pass.setMaxWidth(200);
    pass.setPromptText("Password");
    Button logbtn = new Button("Log in");
    logbtn.setOnAction(new LoginEventHandler(login, pass, results, main));
View Full Code Here


    connect = (Connection) args.get(1);
   
    Label lsearch = new Label("Client search");
   
    Label lid = new Label("Id: ");
    TextField tfid = new TextField();
    tfid.addEventFilter(KeyEvent.KEY_TYPED, new NumFilter());
   
    Label lname = new Label("Name: ");
    TextField tfname = new TextField();
    tfname.addEventFilter(KeyEvent.KEY_TYPED, new NameFilter());
   
    Button btnsearch = new  Button("Search");
    List<Node> arg = new LinkedList<Node>();
    arg.add(tfid); arg.add(tfname);
    btnsearch.setOnAction(new ClientSearchEventHandler(results, connect, arg));
View Full Code Here

    rbook.setHgap(10);
    rbook.setVgap(10);
    rbook.setPadding(new Insets(50, 0, 0, 0));
    Label lbook = new Label("Booking");
    Label lclid = new Label("Client id: ");
    TextField tfid = new TextField();
    tfid.addEventHandler(KeyEvent.KEY_TYPED, new NumFilter());
    Label lroomnum = new Label("Room number: ");
    TextField tfroomnum = new TextField();
    tfroomnum.addEventHandler(KeyEvent.KEY_TYPED, new NumFilter());
    Button btnbook = new Button("Book!");
    btnbook.setDisable(true);
    btnbook.setOnAction(new BookEventHandler(results, tfid, tfroomnum));
    rbook.add(lbook, 0, 0);
    rbook.add(lclid, 0, 1);
View Full Code Here

            } else if (SRC.equals(checkBox5)) {
                field5.setVisible(!checkBox5.isSelected());
            }
        };

        field1 = new TextField();
        field1.setPromptText("text1");
        field2 = new TextField();
        field2.setPromptText("text2");
        field3 = new TextField();
        field3.setPromptText("text3");
        field4 = new TextField();
        field4.setPromptText("text4");
        field5 = new TextField();
        field5.setPromptText("text5");

        button1 = new ToggleButton("invalid");
        button1.setPrefWidth(100);
        button1.setOnAction(handler);
View Full Code Here

    Scene scene = new Scene(vBox, 320, 100);

    final Dialog dialog = new Dialog(title, owner, scene);

    final TextField textInput = new TextField();

    textInput.setOnKeyPressed(new EventHandler<KeyEvent>()
    {

      @Override
      public void handle(javafx.scene.input.KeyEvent event)
      {
        if (KeyCode.ENTER.equals(event.getCode()))
        {
          Dialogs.textInput = textInput.getText();
          dialog.close();
          response = Response.YES;
        }
      }

    });

    Button btnOK = new Button("OK");

    btnOK.setOnAction(new EventHandler<ActionEvent>()
    {
      @Override
      public void handle(ActionEvent e)
      {
        Dialogs.textInput = textInput.getText();
        dialog.close();
        response = Response.YES;
      }
    });

    Button btnCancel = new Button("Cancel");

    btnCancel.setOnAction(new EventHandler<ActionEvent>()
    {
      @Override
      public void handle(ActionEvent e)
      {
        dialog.close();
        response = Response.NO;
      }
    });

    HBox hBox = new HBox();
    hBox.setAlignment(Pos.CENTER);
    hBox.setSpacing(10);
    hBox.setPadding(new Insets(10));

    hBox.getChildren().addAll(btnOK, btnCancel);

    if (message != null && message.length() > 0)
    {
      vBox.getChildren().add(new Label(message));
    }

    vBox.getChildren().add(textInput);
    vBox.getChildren().add(hBox);

    dialog.showDialog();

    textInput.requestFocus();

    return response;
  }
View Full Code Here

  public ClassSearch(TriView triView, PackageManager pm)
  {
    this.triView = triView;
    this.pm = pm;

    tfSearch = new TextField();
    tfSearch.setPromptText("Enter class name");
    tfSearch.prefWidthProperty().bind(widthProperty());

    getChildren().add(tfSearch);
View Full Code Here

  {
    HBox hbox = new HBox();

    hbox.setSpacing(20);

    txtCompilerThreshold = new TextField(Integer.toString(config.getCompilerThreshold()));
    txtCompilerThreshold.setMaxWidth(70);
    txtCompilerThreshold.setAlignment(Pos.BASELINE_RIGHT);

    Label label = new Label("-XX:CompilationThreshold:");
View Full Code Here

    };
  }

  private void buildHBoxFreqInline(HBox hbCompilerSettings)
  {
    txtFreqInline = new TextField(Integer.toString(config.getFreqInlineSize()));
    txtFreqInline.setMaxWidth(50);
    txtFreqInline.setAlignment(Pos.BASELINE_RIGHT);
    txtFreqInline.setDisable(config.isDisableInlining());

    Label label = new Label("-XX:FreqInlineSize:");
View Full Code Here

    hbCompilerSettings.getChildren().add(txtFreqInline);
  }

  private void buildHBoxMaxInline(HBox hbCompilerSettings)
  {
    txtMaxInline = new TextField(Integer.toString(config.getMaxInlineSize()));
    txtMaxInline.setMaxWidth(50);
    txtMaxInline.setAlignment(Pos.BASELINE_RIGHT);
    txtMaxInline.setDisable(config.isDisableInlining());

    Label label = new Label("-XX:MaxInlineSize:");
View Full Code Here

 
  private VBox getVBoxLanguage()
  {
    VBox vbox = new VBox();

    tfLanguage = new TextField();

    vbox.getChildren().add(new Label("Language Name"));
    vbox.getChildren().add(tfLanguage);
   
    return vbox;
View Full Code Here

TOP

Related Classes of javafx.scene.control.TextField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.