private static void selectComponentsInRange(final RadComponent component, final RadComponent anchor) {
    final GridConstraints c1 = component.getConstraints();
    final GridConstraints c2 = anchor.getConstraints();
    int startRow = Math.min(c1.getRow(), c2.getRow());
    int startCol = Math.min(c1.getColumn(), c2.getColumn());
    int endRow = Math.max(c1.getRow() + c1.getRowSpan(), c2.getRow() + c2.getRowSpan());
    int endCol = Math.max(c1.getColumn() + c1.getColSpan(), c2.getColumn() + c2.getColSpan());
    for(int row=startRow; row<endRow; row++) {
      for(int col=startCol; col<endCol; col++) {
        RadComponent c = anchor.getParent().getComponentAtGrid(row, col);
        if (c != null) {
          c.setSelected(true);
        }
      }
    }
  }
private static void selectComponentsInRange(final RadComponent component, final RadComponent anchor)