Some time I found my Swing application to use CPU when nothing happens. When the window is minimized CPU is not loaded, only when window is open. I don't use such repaint timers in application. Here is a stack trace. I suppose that AnimationController causes infinite repaint in some situations which I cannot find. VisualVM stack trace screenshot: http://i.imgur.com/NdgroCk.png
Maybe someone knows about this bug?
Java 1.6_38 64 bit, Windows 7.
Linking to external sites is no good, many people visit this forum during work time and are likely blocked from visiting such sites.
You want this to be a bug in Swing, but you have absolutely no grounds to make such a claim yet. I say that for the following reasons:
1) you are using an outdated version of Java. First try to see if you can reproduce using Java 7
2) it is simply highly unlikely that YOU are going to be the one to find such a problem in a mature API like Swing. Its been around too long and been used by too many people already
3) you provide no simplified example case that demonstrates the problem on your machine so other people can try and reproduce it on their own machines
Its all a big guess to be honest that for all I know is caused by you interfering with the EDT in some way. But weirder things have happened and Swing was never really developed for Windows 7, so it might just be that there is some sort of odd conflict. When you are in a better position to be helped, feel free to make me eat my words.
Unfortunately the bug is very rare and I cannot reproduce it at moment I want. I just noticed that once again and connect VisualVM to get some info.
I don't see a way to add a screenshot without linking to external site. On that screenshot you can see that AnimationController.actionPerformed is called 359 times and paintDirtyRegions is called 360 times, so I suppose that repaints are called from AnimationController.
About EDT - we are checking non-EDT Swing usage (like this: http://docs.codehaus.org/display/FEST/Testing+that+access+to+Swing+components+is+done+in+the+EDT) and no warnings were thrown.
I'm really sorry that I have no enough info :)