Stylesheet stylesheet = new Stylesheet("JFrame { font-face: Helvetica }"); stylesheet.applyTo(myFrame);
Stylesheet objects can be modified after creation, but the changes do not become "live" until the stylesheet is reapplied using the {@link com.sun.css.Stylesheet#applyTo} or {@link com.sun.css.Stylesheet#reapply} methods.