This project is an implementation of CSS stylesheets for Java GUI components. For instance, the following stylesheet:
JButton.link {
border: null;
foreground: blue;
text-decoration: underline;
}
JButton.link:armed {
foreground: red;
}
will change all buttons with the "link" style class to look like HTML links rather than standard buttons.
Flying Saucer is an XHTML renderer written in Java. It's 100% Java, not a native wrapper, and it only handles well-formed XHTML + CSS. It is intended for embedding web-based user interfaces into Java applications (ex. web photo album generator, help viewer, iTunes Music Store clone). It cannot be used as a general purpose web browser since it does not support the malformed legacy HTML found on the web, though recent work on compatibility libraries may be enough to do what you need. You may be able to work with legacy HTML (e.g. HTML that is not well-formed XML) by using a pre-processor that cleans it up; there are several of these, including JTidy and TagSoup.