public static boolean isSquare(Component c) {
    return c instanceof AbstractButton && "square".equals(((AbstractButton)c).getClientProperty("JButton.buttonType"));
  }
public static boolean isSquare(Component c)