Java2D - drawString( ... ) does something strange ..


2005-03-21 08:56:46 PM
jbuilder0
Hello,
I wrote an appliction what uses a subclass of Component to draw some lies
and text on a swing based userinterface. There is an editor frame where you
can input the text, the color etc ... The preview in this Box works fine,
like I want it. The text is shown correctly.
But now I use the same Object to render it (the text) to an other Component
via the Method: g2.drwaString( ... ).
Here is the Problem:
The text has the corecct size and Color. The Position is also correct. But
the text is show in kind of a mirror show something, that means the letters
are in correct order but are display under the baseline (they are standing
on their head :-)
I think the problem comes from an AffineTransform Object used in the paint
Method of the Object I want to render my text to, but i could not find it
yet and I have no idea what fact cauces this effect realy.
How can I force the text is shown in the right way on this Component?
Thank you very much.
Mirko Kämpf