Hello,
I'm having a
painting problem related to the AffineTransform.
In short this is
what I see:
When my JPanel
appears on screen, the drawing of vertical lines is shifted to the
right.
When I move the
mouse into the panel, my panel's mouse listener calls
update(getGraphics());
Then the drawing
shifts to the left where it should be.
I have put some
diagnostic print statements in my paintComponent() method and this is what I
see.
======================================
BEFORE the call to
update(getGraphics())
AffineTransform[[1.0, 0.0, 150.0], [0.0, 1.0, 0.0]]
AFTER the call to
update(getGraphics())
AffineTransform[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0]]
=====================================
so the only
difference is in m02:
initially it is 150,
after update(getGraphics()) it is 0.
My JPanel is inside
a JFrame with a few other components.
If I cover my JFrame
with another window and then reexpose it using ALT TAB, m02 returns to
150.
Then mousing into
the panel sets it back to 0 again.
Anyone ever seen
anything like this before?
Any
suggestions?
I'm running Java
1.4.1_02 on Windows XP.
Thanks,
Ted
Hill
