code: private ButtonVariantPainter getButtonPainter(JComponent c) {
          Object               buttonType = c.getClientProperty("JButton.buttonType");
          ButtonVariantPainter button     = standard;
  
          if ("textured".equals(buttonType) || "segmentedTextured".equals(buttonType)) {
              button = textured;
          }
  
          return button;
      }
docs: Determine the button painter variant from the component's client
  property.
  
  @param  c the component.
  
  @return the button painter variant.