import java
import java
import java
import java
import java
import java
import java
import java
import java
public class MyMouseAdapter {
public static void main(String[] args) {
new MyFrame
}
}
class MyFrame
ArrayList points=null;
MyFrame
super(s);
points=new ArrayList();
setLayout(null);
setBounds(
this
setVisible(true);
this
}
public void paint(Graphics g){
Iterator i=erator();
while(i
Point p=(Point)i
g
g
}
}
public void addPoint(Point p){
points
}
}
class Monitor
public void mousePressed(MouseEvent e){
MyFrame
f
f
}
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/26376.html