java.awt 当鼠标经过时按钮改变颜色 这是怎么写的
button1.addMouseListener(newjava.awt.event.MouseAdapter(){publicvoidmouseEntered(java...
button1.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseEntered(java.awt.event.MouseEvent evt) {
mouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
mouseExited(evt);
}
});
button1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
mouseMoved(evt);
}
}); 展开
public void mouseEntered(java.awt.event.MouseEvent evt) {
mouseEntered(evt);
}
public void mouseExited(java.awt.event.MouseEvent evt) {
mouseExited(evt);
}
});
button1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {
public void mouseMoved(java.awt.event.MouseEvent evt) {
mouseMoved(evt);
}
}); 展开
展开全部
鼠标事件,改变按钮的属性
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询