View RSS Feed

Java AWT

Java Abstract Window Toolkit (AWT)

  1. Drawing Multiple Lines of Text

    by , 03-07-2012 at 05:56 PM
    LineBreakMeasurer shall be used in case you want your styled text paragraph to get fit in a specific width. Styled text is broken down into lines by this class so that to make them fit in a visual advance. As a TextLayout object every line is returned, that presents the styled and unchangeable character data. This class accesses the layout information.

    The getDescent and getAscent methods of Textlayout make the information to be returned regarding font which positions the component ...