public static void centerOnParentAndSetVisible ( Window window ) { window . pack ( ) ; centerOnParent ( window , window . getParent ( ) ) ; window . setVisible ( true ) ; }
Pack the window center it relative to it s parent and set the window visible .