code: public void removeColumn(int columnIndex) {
          if (columnIndex < 1 || columnIndex > getColumnCount()) {
              throw new IndexOutOfBoundsException(
                      "The column index " + columnIndex
                      + " must be in the range [1, " + getColumnCount() + "].");
          }
          colSpecs.remove(columnIndex - 1);
          shiftComponentsHorizontally(columnIndex, true);
          adjustGroupIndices(colGroupIndices, columnIndex, true);
      }
docs: Removes the column with the given column index from the layout. Components will be rearranged
  and column groups will be readjusted. Therefore, the column must not contain components and
  must not be part of a column group.<p>
  
  The component shift works as follows: components that were located on the right hand side of
  the removed column are moved one column to the left; component column span is decreased by
  one if it intersects the removed column.<p>
  
  Column group indices that are greater than the column index will be decreased by one.<p>
  
  <strong>Note:</strong> If one of the constraints mentioned above is violated, this layout's
  state becomes illegal and it is unsafe to work with this layout. A typical layout
  implementation can ensure that these constraints are not violated. However, in some cases you
  may need to check these conditions before you invoke this method. The Forms extras contain
  source code for class {@code FormLayoutUtils} that provides the required test methods:<br>
  {@code #columnContainsComponents(Container, int)} and<br>
  {@code #isGroupedColumn(FormLayout, int)}.
  
  @param columnIndex index of the column to remove
  @throws IndexOutOfBoundsException if the column index is out of range
  @throws IllegalStateException if the column contains components or if the column is already
  grouped
  
  see com.jgoodies.forms.extras.FormLayoutUtils#columnContainsComponent(Container, int) see
  com.jgoodies.forms.extras.FormLayoutUtils#isGroupedColumn(FormLayout, int)