Java Window buildWindow(Float opacity)

Here you can find the source of buildWindow(Float opacity)

Description

build Window

License

Open Source License

Declaration

private static JFrame buildWindow(Float opacity) 

Method Source Code


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

import java.awt.Color;

import javax.swing.JFrame;

public class Main {
    private static JFrame buildWindow(Float opacity) { //building the JFrame
        JFrame frame = new JFrame();
        frame.setUndecorated(true);/*from   ww w . j a v a 2  s . c  om*/
        frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setOpacity(opacity);
        frame.getContentPane().setBackground(Color.black);
        frame.setLayout(null);
        frame.setVisible(true);
        return frame;
    }
}

Related

  1. arrangeWithin(final Shape shapeToArrange, final Rectangle window, final int arrangement, Insets padding)
  2. cascade(Window[] windows, Rectangle dBounds, int separation)
  3. closeByESC(final Window window, JPanel panel)
  4. createWindow(String name, int width, int height, boolean guiOn)
  5. decorate(final Window w)