I have written a custom component that extends JPanel and overridden its paint() method. Now I can see that this method is called once per 10 milliseconds when the component is displaying. Nothing changes in the component but paint() is still called. I have several calls repaint() but none of them is called actually. How to know what is causing such frequent updates?
UPDATE! There was "bug" in my code. I was updating inner components form paint() method so it was the root cause of continuous repainting. But still, the question is not answered: how to understand what supplies events to the queue?