Your question is:
How to know that paintComponent(Graphics g) has finished it's job?
And then you state in a comment to the question:
I created the button (simple JComponent), and it must first to fade out, and right after that perform actionlistener.actionPerformed(someEvent)
As I suspected, you appear to be doing something wrong inside of paintComponent since the driver behind the fading out should not be inside of this method. The method should be fast as all get out, it should complete in the figurative "blink of an eye", and should not have any delays or fading inside of it. Rather you'll likely use a Swing Timer to change a class field that the button uses for it's transparency, calling repaint after each change of state, and then when the Timer is done, you call your code do whatever action you desire.
For more specific help, consider creating and posting an sscce.