Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8128986

TextField's setPrefColumnsCount() work is not clear. Seems it does not work.

XMLWordPrintable

      package bugsverifying;

      import javafx.application.Application;
      import javafx.scene.Parent;
      import javafx.scene.Scene;
      import javafx.scene.control.TextField;
      import javafx.scene.layout.VBox;
      import javafx.stage.Stage;

      public class Main extends Application{
             public static void main(String[] args) {
              launch(Main.class, args);
          }

          private Parent getContent() {

              VBox list=new VBox();
              TextField box= new TextField("Hello world!!!");
              box.setPrefColumnCount(5);
              list.getChildren().addAll(box);
              return list;
          }

          public void start(Stage stage) {
              stage.setX(100);
              stage.setY(100);
              Scene scene = new Scene(getContent());
              stage.setScene(scene);
              stage.show();
          }
      }

      Also see http://javafx-jira.kenai.com/browse/RT-12979

      And also, please, write in documentation in which circumstances pref columns count is taken into account.

            rbair Richard Bair (Inactive)
            akirov Alexander Kirov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: