GUI freeze with repaint on component

I have an Issue with my whole plugins GUI freezes when calling repaint() on a component... even an empty component.

To isolate a little I made an empty TestComponent inheriting component with an empty paint()-method so no time spent there.

From my main window component's paint method I call repaint on my testComponent. If I comment out the repaint-call all works as usual.

The same code works well at my mac with xcode but not on my windows machine.

Kind of lost here, any ideas what I could be doing wrong?

Create the smallest possible code snippet that shows the problem, and post it here. You're probably just doing something silly, but I can't guess what it is.

In my main Components class I have a private "Component* testComponent2"

In my main components constructor:

    testComponent2* = new Component("test2");




In my main components paint() I just do.



If I skip calling the setBounds it works.

Why would you call repaint() inside paint()??

It is an oscilloscope I want repainted all the time.

The oscilloscope can also be clicked so it made sense to make in a Component.

Try using a Timer to repaint it instead.


Quick test and Timer seems to work better, thanks!