Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: excessive repaints when moving apple.awt.brushMetalLook=true JFrame
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: excessive repaints when moving apple.awt.brushMetalLook=true JFrame



On Nov 30, 2011, at 7:44 AM, Hendrik Schreiber wrote:

> Hi,
>
> there seems to be a bug in the repaint logic when moving a JFrame with the clientProperty apple.awt.brushMetalLook set to true.
>
> 1) When you move a regular JFrame (apple.awt.brushMetalLook=false) its content is painted exactly once, because moving a JFrame without changing its size does not change its content.
> 2) When you move a brushMetalLook JFrame, grabbing it by its titlebar, it's repainted once you stop moving.
> 3) When you add a MouseMotionListener/MouseListener to some of the components in the frame, listen to drag events, and move the JFrame accordingly using setLocation(), repaint is called excessively, which leads to an ugly flicker.
>
> I looked into apple.awt.draggableWindowBackground, but because it makes every component a handle for dragging the whole frame, it basically makes it impossible to drag and drop single components within the UI. That makes it useless.
>
> Is there a better way to do this?

Not really. The brushMetalLook is a poorly supported option that requires unusual gymnastics between Java and native background drawing that occurs on different threads. Currently this options is completely unimplemented in OpenJDK for the Mac, and we are not likely to invest any additional time in trying to fix it in Java SE 6.

Sorry,
Mike Swingler
Apple Inc.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >excessive repaints when moving apple.awt.brushMetalLook=true JFrame (From: Hendrik Schreiber <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.