Detecting when a component is 'really' visible


#1

I’m switching a component between windows by calling addAndMakeVisible() and setBounds(), I need to trigger a function
when the component is actually visible in its place on the window, how can I achieve that?

Thanks


#2

could you not just setBounds first, call addAndMakeVisible, and implement the visibilityChanged?


#3

visibilityChanged() will be called in addAndMakeVisible so it won’t work.


#4

Try the ComponentMovementWatcher class?