public static Dimension getMaximumSize(final GridConstraints constraints, final boolean addIndent) {
    try {
      //[anton] we use only our property for maximum size.
      // JButton reports that its max size = pref size, so it is impossible to make a column of same sized buttons.
      // Probably there are other bad cases...
      final Dimension size = getSize(constraints.myMaximumSize, MAX_SIZE);
      if (addIndent && size.width < MAX_SIZE.width) {
        size.width += DEFAULT_INDENT * constraints.getIndent();
      }
      return size;
    }
    catch (NullPointerException e) {//IDEA-80722
      return new Dimension(0, 0);
    }
  }
public static Dimension getMaximumSize(final GridConstraints constraints, final boolean addIndent)