Java中的ToolTipManager [英] ToolTipManager in Java

查看:35
本文介绍了Java中的ToolTipManager的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在实现MVC,并且我希望在JLabel上具有JToolTip.我成功了,但是现在我想设置解雇和初始计时器.

I am implementing a MVC and i want to have a JToolTip on a JLabel in my view. I succeeded but now i want to set the dismiss and initial timer.

我阅读了 JToolTip 的Javadoc.和 TollTipManager .我在ToolTipManager中找到了想要的东西,但是现在我不明白如何使用它.

I read the Javadoc for JToolTip and TollTipManager. I found what i want in ToolTipManager but now i can't understand how to use it.

JToolTip尚未设置ToolTipManager,在文档中他们说:

JToolTip haven't setter for ToolTipManager and in the doc they said :

管理系统中的所有工具提示.

Manages all the ToolTips in the system.

我不太了解如何使用ToolTipManager.我的视野应该延伸ToolTipManager还是完全误导我?

I don't really understand how i should use ToolTipManager. Should my View extends ToolTipManager or i misleading totally ?

推荐答案

ToolTipManager是单例.要使用它,您需要调用静态的

ToolTipManager is a singleton. To use it, you need to call a static sharedInstance method that returns the instance of this class.

ToolTipManager管理所有工具提示-这是一个全局配置类,对sharedInstance所做的更改将应用​​于您应用程序中的每个工具提示.

ToolTipManager manages all tooltips - it is a global configuration class, changes made to the sharedInstance will be applied to every tooltip in your application.

这篇关于Java中的ToolTipManager的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆