How do I put html in a JLabel in java?

The Java Man picture The Java Man · Jul 9, 2011 · Viewed 27.4k times · Source

How do I use html tags in a JLabel in java?

Answer

Globmont picture Globmont · Jul 9, 2011

To put html in a JLabel, you would make it look something like this

 JLabel label = new JLabel("<html><yourTagHere><yourOtherTagHere>this is your text</yourOtherTagHere></yourTagHere></html>");