关于画线问题
这个程序的 "orgX=e.getX() "和 "orgY=e.getY() "这两个坐标的值为什么是0,0能
import java.awt.*;
import java.awt.event.*;
public class DrawLine
{
Frame f=new Frame( "DrawLine ");
public static void main(String[] args)
{
new DrawLine().init();
}
public void init()
{
f.setBounds(100,100,500,350);
f.setVisible(true);
f.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
f.addMouseListener(new MouseAdapter()
{
int orgX;
int orgY;
public void mousePressd(MouseEvent e)