Tooltip behavior that treats a JComponent with sub

2019-07-18 04:00发布

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?

0条回答
登录 后发表回答