How to set JavaFX default skin


I noticed that when I run JavaFX application on JVM 7 and JVM 8 I get different default skins. How I can set the default skin to be same on every JVM?

6/25/2013 12:47:44 PM

Accepted Answer

You can set the default skin:

public void start(Stage stage) throws Exception {

6/29/2013 1:19:50 PM

The default stylesheet for JavaFX 2 is caspian.css. You can find it in jfxrt.jar under This changed with JavaFX 8 and I believe the default stylesheet is named modena.css. In order to get a common stylesheet, you will have to either define your own or copy one of the defaults into your project.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow