protected void paintBackground( Graphics g, JComponent c ) {
		Color background = getBackground( c );
		if( background == null )
			return;

		Graphics2D g2 = (Graphics2D) g.create();
		try {
			FlatUIUtils.setRenderingHints( g2 );

			boolean def = isDefaultButton( c );
			boolean isToolBarButton = isToolBarButton( c );
			float focusWidth = isToolBarButton ? 0 : FlatUIUtils.getBorderFocusWidth( c );
			float arc = FlatUIUtils.getBorderArc( c );
			float textFieldArc = 0;

			// if toolbar button is in leading/trailing component of a text field,
			// increase toolbar button arc to match text field arc (if necessary)
			if( isToolBarButton &&
				FlatClientProperties.clientProperty( c, STYLE_CLASS, "", String.class ).contains( "inTextField" ) )
			{
				JTextField textField = (JTextField) SwingUtilities.getAncestorOfClass( JTextField.class, c );
				if( textField != null )
					textFieldArc = FlatUIUtils.getBorderArc( textField );
			}

			int x = 0;
			int y = 0;
			int width = c.getWidth();
			int height = c.getHeight();

			if( isToolBarButton && c.getBorder() instanceof FlatButtonBorder ) {
				Insets spacing = UIScale.scale( ((FlatButtonBorder)c.getBorder()).toolbarSpacingInsets );
				x += spacing.left;
				y += spacing.top;
				width -= spacing.left + spacing.right;
				height -= spacing.top + spacing.bottom;

				// reduce text field arc
				textFieldArc -= spacing.top + spacing.bottom;
			}

			// increase toolbar button arc to match text field arc (if necessary)
			if( arc < textFieldArc )
				arc = textFieldArc;

			// paint shadow
			Color shadowColor = def ? defaultShadowColor : this.shadowColor;
			if( paintShadow &&
				shadowColor != null && shadowWidth > 0 && focusWidth > 0 && c.isEnabled() &&
				!isToolBarButton && !isBorderlessButton( c ) &&
				!(isFocusPainted( c ) && FlatUIUtils.isPermanentFocusOwner( c )) )
			{
				g2.setColor( shadowColor );
				g2.fill( new RoundRectangle2D.Float( focusWidth, focusWidth + UIScale.scale( (float) shadowWidth ),
					width - focusWidth * 2, height - focusWidth * 2, arc, arc ) );
			}

			// paint background
			Color startBg = def ? defaultBackground : startBackground;
			Color endBg = def ? defaultEndBackground : endBackground;
			if( background == startBg && endBg != null && !startBg.equals( endBg ) )
				g2.setPaint( new GradientPaint( 0, 0, startBg, 0, height, endBg ) );
			else
				g2.setColor( FlatUIUtils.deriveColor( background, getBackgroundBase( c, def ) ) );

			FlatUIUtils.paintComponentBackground( g2, x, y, width, height, focusWidth, arc );
		} finally {
			g2.dispose();
		}
	}
Returns true if the button has an icon but no text,
or it does not have an icon and the text is either "..." or one character.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatButtonUI.java