J
Joana
hi gurus,
I want to drow a rectangle, where a certain stringer fits inside.
I compute the string size in such a way:
Frame frame // here are my component. In the component are rectangle & string
frame.pack();
Graphics g = frame.getGraphics();
FontMetrics fm = g.getFontMetrics();
Rectangle2D bounds = fm.getStringBounds();
If I draw the rectangle of the bounds-large, I see 2/3 the whole
string in the rectangle only.
Why?
thanks for any help!
best reagards,
Joana
I want to drow a rectangle, where a certain stringer fits inside.
I compute the string size in such a way:
Frame frame // here are my component. In the component are rectangle & string
frame.pack();
Graphics g = frame.getGraphics();
FontMetrics fm = g.getFontMetrics();
Rectangle2D bounds = fm.getStringBounds();
If I draw the rectangle of the bounds-large, I see 2/3 the whole
string in the rectangle only.
Why?
thanks for any help!
best reagards,
Joana