if (event.getType() == TableModelEvent.INSERT || event.getType() == TableModelEvent.DELETE) revalidate();
  public void tableChanged (TableModelEvent event)  {    // update the column model from the table model if the structure has    // changed and the flag autoCreateColumnsFromModel is set    if ((event.getFirstRow() ==TableModelEvent.HEADER_ROW)        && autoCreateColumnsFromModel)        createDefaultColumnsFromModel();    repaint();  }