Renderers are just "rubber stamps" painted onto the component. They are not live, interactive components.
See this answer: JButton in JList for one possible solution. Effectively, you add a MouseListener
to your JList
, determine which particular button is being rendered at that click-point, then programmatically click that button.
Or, you could make a JPanel
of buttons, and place the panel in a JScrollPane
.
Or, you could make a single-column JTable
, where you could implement a custom TableCellEditor, as seen here: Table Button Column