Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Applet and css

870573Jun 22 2011 — edited Jun 23 2011
In 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

Comments

Processing
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jul 21 2011
Added on Jun 22 2011
6 comments
282 views