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.

解决方案 »

  1.   

    feelyou(非鱼),thanks a lot。
    1.可是我看到有一个例子是这样做的,而且程序运行正常,可我拿来就不行。:(
    2.自己实现是不是很麻烦?我现在用imageListBox来做(用了个很笨的方法,画了几个颜色方块的gif),效果是出来了,但选择时麻烦了一点,用滚动条选择后,还要用鼠标再点一下。:(
    3.http://www.javaunion.com 现在上不去。:)
      

  2.   

    好了,第一个问题解决了,是我自己在定义style时出了点小问题。:)可是第二个问题那位大侠有源码可以让我看看?