Tooltip behavior that treats a JComponent with subcomponents as a whole? (sans flicker)

喜夏-厌秋 提交于 2019-12-11 03:39:24

问题


I have a JComponent with several subcomponents, and I'd like it to have a tooltip that treats the component as a whole.

For instance, if you look at this solution to a similar question, the tooltip refreshes when you cross from one subcomponent to another, flickering briefly and changing position. Compare this to a JLabel with an icon and text, where the tooltip stays in one spot throughout all the parts of the label. In my application, the pieces are closely packed together, so the flicker from setting the tooltip independently for all the parts is quite distracting.

Is there a way to get the tooltipping to treat the JComponent as a whole?

来源:https://stackoverflow.com/questions/8592264/tooltip-behavior-that-treats-a-jcomponent-with-subcomponents-as-a-whole-sans-f

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!