Java中的多行工具提示? [英] Multi-line tooltips in Java?

查看:160
本文介绍了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屋!

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