Java中的多行工具提示? [英] Multi-line tooltips in Java?
问题描述
我正在尝试在Java中显示工具提示,这可能是段落长度,也可能不是。如何自动换行长工具提示?
I'm trying to display tooltips in Java which may or may not be paragraph-length. How can I word-wrap long tooltips?
推荐答案
如果您将工具提示包装在< html>中
和< / html>
标记,您可以使用< br>
打破行标签。请参阅 http://www.jguru.com/faq/view.jsp?EID = 10653 的例子和讨论。
If you wrap the tooltip in <html>
and </html>
tags, you can break lines with <br>
tags. See http://www.jguru.com/faq/view.jsp?EID=10653 for examples and discussion.
或者你可以使用网上很多地方可以找到的JMultiLineToolTip类,包括
https://github.com/ls-cwi/yoshiko -app / blob / master / src / main / java / com / yoshiko / internal / view / JMultiLineToolTip.java
Or you can use the JMultiLineToolTip class that can be found many places on the net, including https://github.com/ls-cwi/yoshiko-app/blob/master/src/main/java/com/yoshiko/internal/view/JMultiLineToolTip.java
这篇关于Java中的多行工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!