package test;
import java.awt.*;
import java.awt.event.*;
public class java3 extends Frame{
java3(){
super("java3");
addNotify();
addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
Insets insets=getInsets();
setSize(insets.left+insets.right+150,
insets.top+insets.bottom+150);
this.addMouseListener(new MouseEventHandler());
}
class MouseEventHandler extends MouseAdapter{
@SuppressWarnings("deprecation")
public void mousePressed(MouseEvent evt){
Rectangle bounds=getBounds();
int x=evt.getX()+bounds.x;
int y=evt.getY()+bounds.y;
java3 m=new java3();
m.setLocation(x,y);
m.show();
}
}
@SuppressWarnings("deprecation")
static public void main(String[]args){
(new java3()).show();
}
}