[英]JButton mouse over motion listener small info frame (Tooltip)
I need to add a box like this to my JButton
when the mouseMotionListener
is active: 当mouseMotionListener
处于活动状态时,我需要在JButton
添加一个类似的框:
However, I don't know what the name of this box is in Java Swing. 但是,我不知道Java Swing中此框的名称是什么。
Does anyone know what the declaration name is for this? 有人知道这个的声明名称吗?
您应该指的是工具提示 。
Assume that your JButton name is 'button' so button.setToolTipText("Your text here");
假设您的JButton名称为'button',则为button.setToolTipText("Your text here");
will do the trick. 会成功的
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.