from java.awt import Window from javax.swing import SwingUtilities allWindows = system.gui.getOpenedWindows() if len(allWindows)>0: topWindow = SwingUtilities.getAncestorOfClass(Window, allWindows[0]) topWindow.toFront()