Answer the question
In order to leave comments, you need to log in
How to make a context menu in swing.ListCellRenderer on right click on an element?
How to make a context menu in swing.ListCellRenderer on right click on an element ?
JList list = new JList<>(CSlistModel);
//public class CSRenderer extends JLabel implements ListCellRenderer
SRenderer csRenderer = new CSRenderer(this);
//
list.setCellRenderer(csRenderer);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question