Major flickering with JComponent despite DB

Hi.

When I draw hundreds of shapes to a JComponent it starts to flicker like there was no double buffering at all.

I thought JComponents were natively double buffered? Could someone explain this erratic behaviour please…

Also, what is the best way to make a custom double buffering in Java? The first thing that comes to my mind is to have a copy of the JComponent in memory, draw to it and finally copy the contents of it into the original JComponent. Surely there is something more efficient?

Sincerely,
Tommi