import java.awt.Graphics; public class Joon{ int x1, y1, x2, y2; public Joon(int ux1, int uy1, int ux2, int uy2){ x1=ux1; y1=uy1; x2=ux2; y2=uy2; } public void joonista(Graphics g){ g.drawLine(x1, y1, x2, y2); } }