Originally posted by Maneesh Godbole:
But, my renderer did not work for Long. Any idea why? I had set it to Object.class
JTable automatically registers renderers for some classes (see the source code of JTable.createDefaultRenderers). And it uses the most specific renderer it can find for a column. So if you want those classes to be rendered by the renderer registered for Object, you will have to delete the more specific ones by setting them to null. For example:
myTable.setDefaultRenderer(Long.class, null);
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus