dcsimg

How do I insert a separator into a JPopupMenu?

Scott Stanchfield

You can simply add a JSeparator component as follows:

menu.add(new JSeparator());