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

HBox wrong layout with BASELINE_LEFT alignment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.1
    • fx2.0
    • javafx
    • JavaFX 2.0 Beta (Build 30)
      Windows 7 64 bit,
      java version "1.6.0_25"
      Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
      Java HotSpot(TM) Client VM (build 20.0-b11, mixed mode, sharing)

      HBox is created as following:

          private Parent createTopBar() {
              final HBox box = new HBox(2.0);
              box.setAlignment(Pos.BASELINE_LEFT);
              
              final TextBox nameInput = new TextBox(20);
              final PasswordBox passwordInput = new PasswordBox();
              final Button loginCmd = new Button("Log In...");
              
              
              final ProgressBar progressView = new ProgressBar(0.0);
              final Label label1 = new Label("Name:");
              final Label label2 = new Label("Password:");
              
              box.getChildren().addAll(
                      label1,
                      nameInput,
                      label2,
                      passwordInput,
                      loginCmd,
                      progressView
                              );
              return box;
          }


      The resulting layout is broken as shown at the attached screenshot.

        1. FX_HBox.png
          7 kB
          Illya Yalovyy
        2. FX_HBox2.png
          12 kB
          Illya Yalovyy
        3. rt14205.png
          15 kB
          Kinsley Wong
        4. Screen shot 2011-06-27 at 10.41.21 PM.png
          14 kB
          Anne Fowler

            kwwong Kinsley Wong (Inactive)
            iyalovyyjfx Illya Yalovyy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: