code: public void removeRow(int rowIndex) {
          if (rowIndex < 1 || rowIndex > getRowCount()) {
              throw new IndexOutOfBoundsException(
                      "The row index " + rowIndex
                      + "must be in the range [1, " + getRowCount() + "].");
          }
          rowSpecs.remove(rowIndex - 1);
          shiftComponentsVertically(rowIndex, true);
          adjustGroupIndices(rowGroupIndices, rowIndex, true);
      }
docs: Removes the row with the given row index from the layout. Components will be rearranged and
  row groups will be readjusted. Therefore, the row must not contain components and must not be
  part of a row group.<p>
  
  The component shift works as follows: components that were located below the removed row are
  moved up one row; component row span is decreased by one if it intersects the removed row.<p>
  
  Row group indices that are greater than the row 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 #rowContainsComponents(Container, int)} and<br>
  {@code #isGroupedRow(FormLayout, int)}.
  
  @param rowIndex index of the row to remove
  @throws IndexOutOfBoundsException if the row index is out of range
  @throws IllegalStateException if the row contains components or if the row is already grouped
  
  see com.jgoodies.forms.extras.FormLayoutUtils#rowContainsComponent(Container, int) see
  com.jgoodies.forms.extras.FormLayoutUtils#isGroupedRow(FormLayout, int)