On 30-May-06, at 6:20 PM, Florijan Stamenkovic wrote:
...
Somehow at some point of repainting the top corner position is
painted by something that never, at any size comes to that
position. Layout manager mess was my first thought, but I tried
with BorderLayout as well. It however appears regardless of which
layout manager is used. And seems to occur at a point when there
is *much* for Swing to do, i.e. recalculating and resizing many
containers.
Any thoughts?
Note that the circle that appears in the top corner looks like that
of the custom component beside the "Hardware Sample Rate" label.
My guess is that something is messing with the transform on the
graphics object and not restoring it properly. The Swiong
rendering pipeline might call your paint method with the origin
translated to where your component is... imagine if you reset it to
(0,0) when you were done, when really you should have reset it to
the previously saved state.
My guess would be that custom component. The graphics origin could
depend on dirty regions or what component asks to repaint etc.
Perhaps most of the time the Graphics context passed to the
component is normalized to that components rectangle?
Scott
here's the paint code for the jog dial which gets placed on the top
left corner (yes, it belongs to "hardware sample rate"). you can
see : i do call super.paintComponent, i do reset the affine
transform! i use a regular JFrame, i do not modify the content pane,
hence i should have a regular opaque top level container .
public void paintComponent( Graphics g )
{
super.paintComponent( g );
final Graphics2D g2 = (Graphics2D) g;
final Stroke strkOrig = g2.getStroke();
final AffineTransform atOrig = g2.getTransform();
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden