Renderer (Java SE 23 & JDK 23)
Description: declaration: module: java.desktop, package: javax.swing, interface: Renderer
Keywords: javax.swing.Renderer interface

# Interface Renderer

public interface Renderer
Defines the requirements for an object responsible for "rendering" (displaying) a value.

Since:
  1.2

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Component`
  `getComponent()`
  Returns the component used to render the value.
  `void`
  `setValue(Object aValue, boolean isSelected)`
  Specifies the value to display and whether or not the value should be portrayed as "currently selected".

- ## Method Details

  - ### setValue

    void setValue(Object aValue, boolean isSelected)
    Specifies the value to display and whether or not the value should be portrayed as "currently selected".
    Parameters:
      `aValue` - an Object object
      `isSelected` - a boolean

  - ### getComponent

    Component getComponent()
    Returns the component used to render the value.
    Returns:
      the Component responsible for displaying the value