JButton in JList Handling

I want to have a JButton (for removing the item) in a JList. Button when I add the JButton to my JList, the handler doesn't work... I know it's only rendered,.. but how I can I make it - that I recognize the actionPerformed? Maybe, someone have a code-snippet?

I add a vector-list of JPanels, and inside of these JPanels there are my JButton and JLabel.

Upvotes: 2

Views: 2176

Answers (1)

mKorbel
mKorbel

Reputation: 109813

I think JTable would be better JComponents as JList, because there you can implements TableCellEditor, maybe example with similair output here

Upvotes: 3

Related Questions