public void mouseMoved(MouseEvent arg0) {
text1.setText("您在移动鼠标");
text2.setText(e.getX());//报错
}
public void mouseClicked(MouseEvent e){
text4.setText("单机鼠标,坐标:"+e.getX()+"_"+e.getY());//没有问题
D许咚
相关分类