Java tutorial
//package com.java2s; import java.awt.Window; public class Main { /** * Makes a window visible - if invisible - and brings it to front. * * @param window window */ public static void show(Window window) { if (window == null) { throw new NullPointerException("window == null"); } if (!window.isVisible()) { window.setVisible(true); } window.toFront(); } }