private static void addToCell(final GridConstraints constraints, final boolean isRow, final int delta){
    if (isRow) {
      constraints.setRow(constraints.getRow() + delta);
    }
    else {
      constraints.setColumn(constraints.getColumn() + delta);
    }
  }
private static void addToCell(final GridConstraints constraints, final boolean isRow, final int delta)