|
Java™ by example!
|
|
|
How do I apply a CSS to an HTML rendered JLabel?
You can set a StyleSheet on an HTMLEditorKit. It is shared by all HTMLEditorKit instances. This example shows you how to set the margins, colors and size of any h1 used to render HTML in your Swing components. Main.java:
default.css:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|