Skip to main content

JDK7 Animation Fails with Transparent Frame

No replies
bow7535
Offline
Joined: 2010-07-06
Points: 0

I am using JDK7 to create an analog gauge with an animated needle. It works properly using paintImmediately() to animate the needle. But I want the gauge to show without a frame and with a transparent background. So I set the frame undecorated and use frame.setBackground(new Color(0, 0, 0, 0)) for transparency and it displays perfectly. However with any alpha channel value other than 255 the animation fails. The paintImmediately() is suppressed. Is there anything I can do to fix this?