如何在 Java 中设置工具提示的插图?

问题描述:

我用 HTML 格式的文本创建了一个工具提示,这很好用,但我的边框和文本之间没有空格.如何设置 Insets 或 EmptyBorder?

I created a Tooltip with a HTML formated text, this works fine, but I have no space between border and text. How can I set Insets or an EmptyBorder?

找到这篇关于如何更改 Java 工具提示的属性(背景、边框等).它侧重于颜色和边框样式,但也许您也可以将这种方法用于边距(插图).

Found this one article on how to change properties of Java ToolTip (background, border, etc.). It focuses on colors and border style but maybe you can use this approach for margins (insets) too.