开发者

Java Graphics2D drawString wrap text

开发者 https://www.devze.com 2023-01-23 15:41 出处:网络
How do you go about wrapping strings using Graphics2D drawString. Saw some examples like this drawstring开发者_Go百科 replacement

How do you go about wrapping strings using Graphics2D drawString.

Saw some examples like this drawstring开发者_Go百科 replacement

But this does not work since I have a vertically aligned text and the fontmetrics height from graphics gives me 0.


You can use a JTextArea?

This posting shows how the text area can be sized to fit the text.

0

精彩评论

暂无评论...
验证码 换一张
取 消