Martin Vajsar wrote:I'm not sure I understand you correctly. Do you want to display an empty popup menu, so that the user knows his right-click (or whatever action that brings up the popup menu) has been processed? If this is the case, I'd put a single disabled menu item onto the popup menu with text like "no action available" or something similar.
Actually, yes I've done something similar:
the right click checks the "data JList" first, if its empty no JPopupMenu is opened, else it shows the JPopupMenu with all contents.