public void mouseMoved(MouseEvent arg0) { text1.setText("您在移动鼠标"); text2.setText(e.getX());//报错 } public void mouseClicked(MouseEvent e){ text4.setText("单机鼠标,坐标:"+e.getX()+"_"+e.getY());//没有问题 }}
添加回答
举报
0/150
提交
取消