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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      Win7, build 41.

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: