The problem with using html in JLabel
or any Swing component is that you then have to style it as html, not with the usual setFont
, setForeground
, etc. If you're ok with that, fine.
Otherwise you can use something like MultilineLabel from JIDE, which extends JTextArea
. It's part of their open source Commom Layer.