怎样透明Java窗体
1个回答
2016-12-03
展开全部
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);
}
}
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);
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询