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

HBox wrong layout with BASELINE_LEFT alignment

    XMLWordPrintable

    Details

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

      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)

      Description

      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.

        Attachments

        1. FX_HBox.png
          FX_HBox.png
          7 kB
        2. FX_HBox2.png
          FX_HBox2.png
          12 kB
        3. JavaFXApplication6.zip
          14 kB
        4. rt14205.png
          rt14205.png
          15 kB
        5. Screen shot 2011-06-27 at 10.41.21 PM.png
          Screen shot 2011-06-27 at 10.41.21 PM.png
          14 kB

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: