In Java, How to draw multi-line text with auto-resizing font that must fit into a bounds -
using textlayout , linemeasurer (the way draw multiline center-aligned text in java), how 1 go this?
use jtextpane. can set paragraph attributes "centered" , every line centered within text pane. after create text pane can like:
simpleattributeset center = new simpleattributeset(); styleconstants.setalignment(center, styleconstants.align_center); doc.setparagraphattributes(0, doc.getlength(), center, false);
Comments
Post a Comment