Here you can find the source of showFrame(JFrame frame)
public static void showFrame(JFrame frame)
//package com.java2s; //License from project: Open Source License import javax.swing.JFrame; public class Main { public static void showFrame(JFrame frame) { frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.pack();/*from ww w .j ava 2 s. c o m*/ frame.setVisible(true); } }