且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

JList中的项目可以格式化为HTML

更新时间:2022-12-15 12:50:35

其实很简单。对于列表中的每一个字符串,都用下面的html标签包围它:

Its actually very simple. For every string in the list surround it with the html tags such as this:

<html><font color=green>this will be green</font></html>

当JList显示它时,它会变绿。

When the JList displays it it will be green.