Determine JFrame for Dockable

Is it possible to determine in which JFrame (or JDialog) a SingleCDockable is currently displayed?

We would need this information for positioning modal dialogs and obtaining the window handle.

A guess…
Window owner = SwingUtilities.getWindowAncestor(dockable.getContentPane());
but wait what Beni says … :slight_smile:

Thanks Marco, this works fine.

For Default dockables. Maybe there is an more general (or elegant) solution for general dockables…

That’s the solution I would have suggested too.