A displayed Image (or any other Node) in a Dialog is not cleared, when it is removed from the scene graph by setting the property 'graphic' to null. This is the case if there is a header (graphic is displayed in the header) and also if not (graphic is displayed left of the content).
To reproduce:
- Create a Dialog and show it
- Add a graphics Node with Dialog.setGraphic(Node node);
- Remove the graphics node with Dialog.setGraphic(null);
=> The Node will still be displayed on screen
See also Demo-Application:
- Click on "Open Dialog"
- Click on any Button to see the graphic Image change
- Click on "- no image -" => The image will not be cleared
To reproduce:
- Create a Dialog and show it
- Add a graphics Node with Dialog.setGraphic(Node node);
- Remove the graphics node with Dialog.setGraphic(null);
=> The Node will still be displayed on screen
See also Demo-Application:
- Click on "Open Dialog"
- Click on any Button to see the graphic Image change
- Click on "- no image -" => The image will not be cleared