Just because it's:

Setting specific areas of JLabel bold

August 1st, 2006

.. today I had the problem, to mark a specific part of a JLabel as bold text. Some guy on freenode told me to set HTML as label text.

label.setText(”<html><body>here comes <b>bold</b> text</body></html>”) ;

Its quite simple, but it works great!s quite simple, but it works great!

Leave a Reply