• Having Fun with StyledLabel

    by  • September 10, 2011 • Java and Swing, JIDE

    I’ll start with a question. Using Java Swing, how do you implement something like these?

     

    All three examples are very common in a real application.

    1. The first one is to show a ™ trademark sign next to Java. It is the same thing for a ® (registered trademark) sign.
    2. The second one is a math formula.
    3. The third one indicates the text has an error.

    We want to use both the red color and a waved underline to indicate the error. Keep in mind, from accessibility point of view, only the red color is not enough because of color blindness.

    Please continue reading the rest of the article at http://www.jidesoft.com/articles/StyledLabel.pdf.