isValid = (gridX > 1) && (gridX + flConstr.gridWidth - 1 <= formLayout.getColumnCount());
isValid = (gridX > 0) && (gridX + flConstr.gridWidth - 1 <= formLayout.getColumnCount());
  public void acceptComponentLayoutChange(int index, PropertyChangeEvent ev) throws PropertyVetoException{    FormLayout formLayout = (FormLayout)getLayoutContext().getPrimaryContainerDelegate().getLayout();    FormLayoutSupportConstraints flConstr = new FormLayoutSupportConstraints((FormLayoutSupportConstraints)getConstraints(index));    boolean isValid = true;    if(ev.getPropertyName().equals("CellConstraints.gridX")){      int gridX = ((Integer)ev.getNewValue()).intValue();      isValid = (gridX > 1) && (gridX + flConstr.gridWidth - 1 <= formLayout.getColumnCount());    }    if(ev.getPropertyName().equals("CellConstraints.gridWidth")){      int gridWidth = ((Integer)ev.getNewValue()).intValue();      isValid = (gridWidth > 0) && (flConstr.gridX + gridWidth - 1 <= formLayout.getColumnCount());    }    if(ev.getPropertyName().equals("CellConstraints.gridY")){      int gridY = ((Integer)ev.getNewValue()).intValue();      isValid = (gridY > 1) && (gridY + flConstr.gridHeight - 1 <= formLayout.getRowCount());    }    if(ev.getPropertyName().equals("CellConstraints.gridHeight")){      int gridHeight = ((Integer)ev.getNewValue()).intValue();      isValid = (gridHeight > 0) && (flConstr.gridY + gridHeight - 1 <= formLayout.getRowCount());    }    if(!isValid){      String messageFormat = getBundle().getString("EXC_InvalidComponentLayoutPropertyChange");      String message = MessageFormat.format(messageFormat, new Object[]{ev.getPropertyName(), ev.getNewValue()});      throw new PropertyVetoException(message, ev);    }  }