My question is if JLabel (java swing) supports html4 and css2. I know, it supports html3.2 but I want newer version.
Or is there another way to display html4 on a jPanel.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In short: no; HTML 3 only, before CSS.
The “HTML” supported by JLabel, JButton, etc, is things like
<font color="" face="" />and<a href="#">to provide inline styling of label textual content.To indicate that an HTML supporting component contains HTML, the string value must be wrapped in
"<html></html>"; this is for backward compatibility with existing code. For example:Further information can be seen here: http://www.apl.jhu.edu/~hall/java/Swing-Tutorial/Swing-Tutorial-JLabel.html and documentation here: http://docs.oracle.com/javase/tutorial/uiswing/components/html.html
JLabel does not provide an implementation of the CSS 2.x visual formatting model, so HTML4 style=”” attributes and CSS box formatting will not work. If you want rich HTML formatting support then you’ll need to use a web-browser component.