Applet and css
870573Jun 22 2011 — edited Jun 23 2011In an applet, StyleManager.loadStylesheet(final String fname) causes a null exception .
The code below evade this :
StyleManager styleManager= StyleManager.getInstance();
URL url=getURL("/indicateurs/charts.css", Main.class);
try {
Stylesheet stylesheet = CSSParser.getInstance().parse(url);
styleManager.setUserAgentStylesheet(stylesheet);
} catch (IOException ex) {
System.out.println("exception:"+e);
}
In the css file indicateurs.charts.css , i add first the source of : sun.javafx.scene.control.skin.caspian.caspian.css (as the setUserAgentStylesheet erase the others stylesheet !!!)
Will there be a more simple way to deal with the css in an applet ?
thanks
Edited by: 867570 on 22 juin 2011 02:16