I've implemented a TreeCellRenderer that returns a JCheckBox (simple code that the renderer extends a JCheckBox and sets its selection status based on a flag in the item) and it works well. However, when there are more than a few items in the list, it renders VERY slowly. Scrolling in the list and expanding nodes takes over 1开发者_StackOverflow中文版 second, which is quite slow. Is there a better way to implement a checkbox tree cell renderer to speed it up?
thanks, Jeff
If you are able to use a third party library then you could use the CheckBoxTree from JIDE Common Layer.
turns out there was something else in my app slowing things down.
精彩评论