Java JFrame Create createTestFrame()

Here you can find the source of createTestFrame()

Description

create Test Frame

License

Apache License

Declaration

public static JFrame createTestFrame() 

Method Source Code

//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;
    }
}

Related

  1. createIFrame(String name)
  2. createImageFrame(Image image)
  3. createNewFrame(String frameName, int width, int height, boolean visible)
  4. createSearchFrame()
  5. createSimpleFrame(String title, Component content)