Here you can find the source of displayWindow(final JFrame window)
public static void displayWindow(final JFrame window)
//package com.java2s; /******************************************************************************* * Copyright (c) 2014 uniVocity Software Pty Ltd. All rights reserved. * This file is subject to the terms and conditions defined in file * 'LICENSE.txt', which is part of this source code package. ******************************************************************************/ import javax.swing.*; public class Main { public static void displayWindow(final JFrame window) { SwingUtilities.invokeLater(new Runnable() { @Override//from www .ja va2 s .c o m public void run() { window.setVisible(true); } }); } }