January 2008 Archives

I was working in the same application where I found the previous quirk. This time I tried to make a cell renderer put a background color in the cell, to no avail. I even tried to explicitly return a JLabel as the cell renderer, with the proper background color set. Nothing.

The answer to the mystery is the fact that JLabel is transparent by default, transparent components don't render their background, and DefaultTreeCellRenderer extends JLabel.

I have been bitten. ListSelectionListener.valueChanged is called more than once when a selection in a List/Tree/Table is changed. After some googling, I found out that I'm not alone.

About this Archive

This page is an archive of entries from January 2008 listed from newest to oldest.

December 2007 is the previous archive.

August 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.