首页 > TAG信息列表 > GetButton
Java Swing(七):鼠标事件MouseEvent
鼠标事件MouseEvent可以给控件/界面添加鼠标事件有三种监听器:1.addMouseListener 点击,按住,抬起,移入,移出2.addMouseMotionListener 移动,拖动3.addMouseWheelListener 鼠标滚轮转动MouseListener接口下要覆盖五个方法:mouseClicked,mouseEntered,mouseExited,mousePressed,mouseReleased