private static void displayFrame(final JFrame frame) {
		try {
			synchronized (ImageUtils.class) {
				frame.setResizable(false);
				frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
				frame.addWindowListener(new WindowAdapter() {
					@Override
					public void windowClosing(WindowEvent event) {
						synchronized (ImageUtils.class) {
							ImageUtils.class.notify();
							frame.dispose();
						}
					}
				});
				frame.pack();
				frame.setVisible(true);
				ImageUtils.class.wait();
			}
		} catch (InterruptedException e) {
			System.out.println("Interrupted Exception in displayFrame().");
			e.printStackTrace();
		}
	}