Refresh or Reload CSS files that are already added to scene.getStyleSheets?
892635Oct 5 2011 — edited Oct 7 2011Congratulations to the JavaFX 2.0 release! This looks really well! Especially that there is now a Mac Developer Preview version! :)
Is there a way to reload css style files that have already been applied to a scene?
Scene.getStylesheets() takes a list of URLs, so instead of using a resource file on the classpath I can use "file:///somepath". This works as expected. Now I'd like to change that file on the filesystem and then re-apply it to the scene to view my changes without the need to restart my application.
I tried to execute:
scene.getStylesheets().clear();
scene.getStylesheets().add("file:///somepath/stylesheet.css");
after I've changed the file /somepath/stylesheet.css on the filesystem but there is no change to the styles at all.
Am I missing something or is this in general not supported?