Announcement Announcement Module
No announcement yet.
Table UI problem after spring RCP lib update Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Table UI problem after spring RCP lib update

    We are trying to figure out what is causing some of our JTables to appear with black backgrounds and white foregrounds (and no selection colour). It seems that only tables created by TableUtils.createStandardSortableTable are affected and this behaviour SEEMS to have started only after we did our last CVS update (Fri Apr 30th, 2004).

    After doing some debugging, it appears the problem boils down to this line in TableUtils.installDefaultRenderers(). However, we are not sure. Can any of you enlighten us? Here is what we have found thus far:

    BeanTableCellRenderer beanRenderer = new BeanTableCellRenderer();
    table.setDefaultRenderer(Object.class, beanRenderer);
    Although BeanTableCellRenderer hasn't changed since last updating, OptimizedTableCellRenderer (BeanTableCellRenderer's super class) has. It appears that the behaviour was changed in OptimizedTableCellRenderer->getTableCellRendererComponent() such that the call to doPrepareRenderer() is commented out. Uncommenting this line seems to solve the problem with BeanTableCellRenderer. I've included it below for reference:

    Code from
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus,int row, int column) 
      super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    //    doPrepareRenderer(table, isSelected, hasFocus, row, column);
      return this;
    Any help would be much appreciated!