How can I get the JFrame in which a JPanel is living?
My current solution is to ask the panel for it\'s parent (and so on) until I find a Window:
Con
You could use SwingUtilities.getWindowAncestor(...) method that will return a Window that you could cast to your top level type.
SwingUtilities.getWindowAncestor(...)
JFrame topFrame = (JFrame) SwingUtilities.getWindowAncestor(this);