View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Using Text Attributes to Style Text

    by , 03-07-2012 at 04:54 PM
    Following text attributes needs to be applied by an application:
    • Underline –Underneath text, a line is drawn.
    • Strikethrough –Through the text, a horizontal line gets drawn.
    • Superscript or Subscript –A Letter of a text which slightly appears below or above a line.
    • Kerning – The space adjustments between characters

    Such text attributes might get applied, by using the Java 2D™ TextAttribute class.

    Text attributes are applied by adding them to a Font object. ...