SwingUtilities' rootpane will do the job