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

Rendering of a given layout is wrong in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx

      To reproduce run the attached NetBeans project: it loads an FXML file, creates a scene with it, then a stage. You'll see a wrong rendering: the layout is made of AnchorPane > TabPane > Tab > Button but for some reason you get a 5 pixels height window which is empty (attached expected rendering as well as effective one).

      As far as I see it's combination of the use of TabPane and the fact root.prefHeight(-1) is called before stage.show() that triggers the issue.
      Not calling root.prefHeight(-1) or doing it after stage.show() solves it.
      Use another container than TabPane (such as TitledPane) solves it.
      Keep TabPane but remove top AnchorPane solves it.

        1. Screen Shot 2014-03-10 at 17.50.09.png
          13 kB
          Yves Joan
        2. Screen Shot 2014-03-11 at 09.01.13.png
          11 kB
          Yves Joan

            Unassigned Unassigned
            yjoan Yves Joan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported: