简体   繁体   English

JButton鼠标悬停在运动侦听器小信息框上(工具提示)

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM