1class MyWindow extends JFrame {
2 int posX=0,posY=0;
3
4 public MyWindow(){
5 this.setUndecorated(true);
6 this.addMouseListener(new MouseAdapter()
7 {
8 public void mousePressed(MouseEvent e)
9 {
10 posX=e.getX();
11 posY=e.getY();
12 }
13 });
14 }
15}