import java.awt.*;
import java.awt.event.*;

import java.io.*;
import java.util.*;

class Line implements Serializable{
private Point st = new Point();
private Point en = new Point();
public Point getSt() {
return st;
}
public void setSt(Point st) {
this.st = st;
}
public Point getEn() {
return en;
}
public void setEn(Point en) {
this.en = en;
}
}

class DrawCanvas extends Frame implements MouseListener{
private Vector<Line> vc = new Vector<Line>();
private Point st = new Point();
private Point en = new Point();
public DrawCanvas(String title) {
super(title);
this.init();
this.start();
this.setSize(800, 600);
this.setResizable(false);
this.setVisible(true);
}
public void init() {
}
public void start() {
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
this.addMouseListener(this);
}
public void paint(Graphics g) {
for (int i = 0 ; i < vc.size() ; i++) {
Line ln = vc.elementAt(i);
           g.drawLine(ln.getSt().x, ln.getSt().y, ln.getEn().x, ln.getEn().y);
}
}

public void mousePressed(MouseEvent e) {
st.x = e.getX();
st.y = e.getY();
}
public void mouseReleased(MouseEvent e) {
en.x = e.getX();
en.y = e.getY();
     Line ln = new Line();
     ln.setSt(st);
     ln.setEn(en);
     vc.add(ln);
this.repaint();
}
public void mouseClicked(MouseEvent e) {}
public void mouseEntered(MouseEvent e) {}
public void mouseExited(MouseEvent e) {}
}

public class Mapmaker {
public static void main(String[] ar) {
DrawCanvas dc = new DrawCanvas("Title");
}
}


/* ---------------------소  ----------------------------  스 ---------------------------- 끝------------------------- */


이전에 그렸던 선들을 vc(Vector)에 저장하고 그리는데, xy좌표를 Point로 지정하면 그려지지가 않습니다.
- vc.size()로 갯수를 세어 보면 갯수는 늘어나는데 화면에 그려지지가 않습니다.
- Point를 사용하지 않고, int st_x, int st_y, int en_x, int en_y; 와 같이 사용하면 잘 작동합니다.

문제가 무엇인지 궁금합니다.