How to get a popup Dialog<T> to inherit styles from main app?

Pete Moss peatmoss84 at
Sat Nov 1 15:08:59 UTC 2014

I am just getting started using the Dialog<T> class and I noticed that my
dialog content is not picking up styles that I've added to a global style
sheet in my app. I suspect because Dialog's HeavyweightDialog is creating a
new Stage.

In my Main class I have:

    Scene scene = new Scene(root, 600, 500, Color.YELLOW);
    String s = Main.class.getResource("ui/styles.css").toExternalForm();

How can I get that stylesheet applied to the scene graph in my popup
dialog? At what point in the lifecycle of my dialog can I do this?


More information about the openjfx-dev mailing list