I've got a custom window class that is a couple levels down extending a JDialog. We have windows that we create and sometimes we create new windows as children of existing windows using the constructor that takes a parent argument.
I need to put some code somewhere in our custom class that does something different depending on whether not the window has children. I know of getParent()
, etc, and I can see that I can loop through the components of the window, but for the life of me, I can't seem to figure out how to determine whether or not my current window has any child windows.
Is there a way to do this? Any help is, as always, much appreciated.