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

[Dialog] Calling Dialog.setHeaderText after Dialog.showAndWait leads to strange effects if header was null before

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8u40
    • 8u40
    • javafx
    • None
    • Win7 x86

      If you open a Dialog without a header and later call Dialog.setHeaderText or Dialog.getDialogPane().setHeader, this leads to some strange effects:

      1) The header area is not styled as expected
      2) The button bar stays in place, although the content moves to make space for the header

      To reproduce:
      - Create Dialog without header and show it
      - Add a header with Dialog.setHeaderText or Dialog.getDialogPane().setHeader

      If the dialog initially has a graphic node the cancel button (ButtonType.CANCEL) will not react anymore after the header has been added.

      To reproduce:
      - Create Dialog with graphic but without a header and show it
      - Add a header with Dialog.setHeaderText
      -> Try to press "Cancel" - will not work

      As a side note: The update of the graphic location on changing the header is not consistent. If the graphic is initialy displayed to the left of the content (because there is no header) the graphic is moved to the header area, if a header is added. If the grafic is initialy displayed in the header area, it will stay there, even if the header is removed.

            jgiles Jonathan Giles
            ckeimeljfx Christoph Keimel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: