if (damaged != null)
    public void valueChanged(ListSelectionEvent e)    {      int index1 = e.getFirstIndex();      int index2 = e.getLastIndex();      Rectangle damaged = getCellBounds(list, index1, index2);      list.repaint(damaged);    }