复制代码 代码如下:
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("半透明的窗口");
frame.setSize(400, 300);
frame.setVisible(true);
frame.setDefaultCloseOperation(Jframe.EXIT_ON_CLOSE);
}
}



