Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

If the default HTML JLabel font under JDK 1.4 and later is bold, since there is no “un-bold” or “plain” command in HTML, how do I get a plain font?

0
Posted

If the default HTML JLabel font under JDK 1.4 and later is bold, since there is no “un-bold” or “plain” command in HTML, how do I get a plain font?

0

In JDK 1.4.x and later you can call JLabel.setFont() to set a PLAIN font, then setText to specify your HTML. Alternatively, J2PrinterWorks includes a JLabel subclass called J2Label which provides a default PLAIN font under any JDK version.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123