[英]Make text inside JButton move or float to right or left when mouse entered in java swing
Can can Anyone now how to make the this happen.现在任何人都可以如何做到这一点。 Is this even possible?这甚至可能吗?
MouseListener
to the button to handle the mouseEntered
and mouseExited
events给按钮添加一个MouseListener
来处理mouseEntered
和mouseExited
事件setMargins(...)
method to adjust the left/right margin to whatever value you wish.生成上述事件后,您可以使用setMargins(...)
方法将左/右外边距调整为您希望的任何值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.