Java implements the jframe transparent form example

  • 2020-04-01 03:04:52
  • OfStack


import javax.swing.JFrame;
public class TansluFrame extends JFrame
{
    public TansluFrame()
    {
        com.sun.awt.AWTUtilities.setWindowOpacity(this, 0.6f);   
    }
    public static void main(String[] args)
    {
        TansluFrame frame = new TansluFrame();
        frame.setTitle(" Translucent window ");
        frame.setSize(400, 300);
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}


Related articles: