1. Use HTMLEditorKit to make JTextPane can display HTML, then use color in HTML.
2. Implement your own ListCellRenderer.
3. It's just the way, you should do it yourself.
4. If free, come here<a href="http://www.javaunion.com" for a cup of coffee.
2. Implement your own ListCellRenderer.
3. It's just the way, you should do it yourself.
4. If free, come here<a href="http://www.javaunion.com" for a cup of coffee.
1.可是我看到有一个例子是这样做的,而且程序运行正常,可我拿来就不行。:(
2.自己实现是不是很麻烦?我现在用imageListBox来做(用了个很笨的方法,画了几个颜色方块的gif),效果是出来了,但选择时麻烦了一点,用滚动条选择后,还要用鼠标再点一下。:(
3.http://www.javaunion.com 现在上不去。:)