Java Window createWindow(String name, int width, int height, boolean guiOn)

Here you can find the source of createWindow(String name, int width, int height, boolean guiOn)

Description

create Window

License

Open Source License

Declaration

private static JLabel createWindow(String name, int width, int height, boolean guiOn) 

Method Source Code


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

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JLabel;

public class Main {
    private static JLabel createWindow(String name, int width, int height, boolean guiOn) {
        JFrame imageFrame = new JFrame(name);
        imageFrame.setSize(width, height);
        imageFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

        JLabel imagePane = new JLabel();
        imagePane.setLayout(new BorderLayout());
        imageFrame.setContentPane(imagePane);

        imageFrame.setVisible(guiOn);//from w w w . j  a  v a 2  s. co  m
        return imagePane;
    }
}

Related

  1. arrangeWithin(final Shape shapeToArrange, final Rectangle window, final int arrangement, Insets padding)
  2. buildWindow(Float opacity)
  3. cascade(Window[] windows, Rectangle dBounds, int separation)
  4. closeByESC(final Window window, JPanel panel)
  5. decorate(final Window w)
  6. dock(Window window, Window dockTo)
  7. enableCloseWindowWithEscape(final W window)
  8. fadeOut(final Window window, final boolean dispose)