Here you can find the source of buildWindow(Float opacity)
private static JFrame buildWindow(Float opacity)
//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; } }