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

Label setAlignment does not work when in center of BorderPane

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 7u6
    • 7u6
    • javafx
    • Windows 7 64-bit, JavaFX 2.2b3 32-bit

      Put a label inside a BorderPane's center. Give the label a background color so you can see how big it is (it should take up the entire center of the BorderPane as BorderPane resizes it). The text is at the top left.

      Using setAlignment on the label should move this text to different corners of the center area of the border pane, but it doesn't work. Clearly the label has lots of empty space, so setAlignment should have some effect.

      Quote from javadoc for Labeled's alignment property: "Specifies how the text and graphic within the Labeled should be aligned when there is empty space within the Labeled."

            kwwong Kinsley Wong (Inactive)
            jhendrikx John Hendrikx
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: