// 去掉标题栏,注意:此设置必须放在设置frame大小位置前,否则无效

this.setUndecorated(true);this.getRootPane().setWindowDecorationStyle(JRootPane.NONE);

//为窗体添加移动监听

this.addMouseListener(new MouseAdapter() {            @Override            public void mousePressed(MouseEvent e) {                point = new Point(e.getX(), e.getY());            }        });        this.addMouseMotionListener(new MouseMotionAdapter() {            @Override            public void mouseDragged(MouseEvent e) {                newPoint = new Point(LoginFrame.this.getLocation().x + e.getX()                        - point.x, LoginFrame.this.getLocation().y + e.getY()                        - point.y);                LoginFrame.this.setLocation(newPoint);            }        });