楼主你好
可以用JFrame(或者Frame)类对象的setUndecorated方法来实现
public void setUndecorated(boolean undecorated)
禁用或启用此组件的装饰.
当参数设为true时 就隐藏了窗口标题栏
给lz一个例子:
import javax.swing.*;
public class Test extends JFrame
{
public Test()
{
this.setUndecorated(true);//隐藏标题栏
this.setSize(300,300);
this.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main (String[] args) {
new Test();
}
}
希望能帮助你哈
温馨提示:答案为网友推荐,仅供参考