0

How do you go about wrapping strings using Graphics2D drawString.

Saw some examples like this drawstring replacement

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

Community
  • 1
  • 1
kal
  • 28,545
  • 49
  • 129
  • 149

1 Answers1

0

You can use a JTextArea?

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

Community
  • 1
  • 1
camickr
  • 321,443
  • 19
  • 166
  • 288