Java JFrame Create createNewFrame(String frameName, int width, int height, boolean visible)

Here you can find the source of createNewFrame(String frameName, int width, int height, boolean visible)

Description

create New Frame

License

Open Source License

Declaration

public static JFrame createNewFrame(String frameName, int width, int height, boolean visible) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.JFrame;

public class Main {
    public static JFrame createNewFrame(String frameName, int width, int height, boolean visible) {
        JFrame frame = new JFrame(frameName);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(width, height);/*www.  jav  a  2 s. c om*/

        if (visible == true) {
            frame.pack();
        }

        frame.setVisible(visible);
        return frame;
    }
}

Related

  1. createFrame(String str, int height, int width)
  2. createFrame(String title)
  3. createFrame(String title, JPanel panel)
  4. createIFrame(String name)
  5. createImageFrame(Image image)
  6. createSearchFrame()
  7. createSimpleFrame(String title, Component content)
  8. createTestFrame()