Suppose I’m inside a child component of a JDialog
.
I want to listen to “resizing events” of that dialog. I guess registering as a ComponentListener
will do the trick
But how do I get a reference to the containing dialog?
I tried SwingUtilities.windowAncestor(child)
, but it returns null