Here you can find the source of createTestFrame()
public static JFrame createTestFrame()
//package com.java2s; //License from project: Apache License import java.awt.FlowLayout; import javax.swing.JFrame; import javax.swing.JPanel; public class Main { public static JFrame createTestFrame() { JPanel panel = new JPanel(new FlowLayout()); JFrame frame = new JFrame(); frame.setSize(200, 200);//from www .ja v a 2 s.c o m frame.setLocationRelativeTo(null); frame.setContentPane(panel); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); return frame; } }