2
I’m making an application with Javafx and would like to put the CSS in external file, for example, the file would be located in the directory "C: app css".
It is possible to recognize the external file?
2
I’m making an application with Javafx and would like to put the CSS in external file, for example, the file would be located in the directory "C: app css".
It is possible to recognize the external file?
3
Use the class instance Scene
, example:
Scene cena = new Scene(Parent);
cena.getStylesheets().add(getClass().getResource("Caminho_Para_O_Arquivo"));
If it doesn’t work out, try it this way:
cena.getStylesheets().add(getClass().getResource("Caminho_Para_O_Arquivo").toExternalForm());
Browser other questions tagged javafx
You are not signed in. Login or sign up in order to post.