Is there some method how to know if class extends JWindow
? For example:
class DialogWindow extends JWindow {
}
How to check if DialogWindow
class extends JWindow
class? I need to know the parent Window
of some component which may be placed on some JPanel
which could be placed again on some JPanel
, and so on on top of DialogWindow
. Of course, I can pass parent instance argument to some component, but maybe there is some better way to do it?
You can try
getClass().getSuperClass()
. A similar question was asked here How to get the parent base class object super.getClass()