JPopupMenu and JEditorPane problem
Hi, I basically have a text editor program that uses a JEditorPane for the input portion of the app. I want to have a JPopupMenu so when the user right clicks on the JEditorPane, a menu will pop up with commands like cut, copy, past, etc. ... your normal right click commands.
My problem is I can get one or the other, but not both at the same time. I use:
(where textScrollPane is a JScrollPane and textBox is the JEditorPane).
I have tried textBox.add(new MouseMenu());
(where MouseMenu() is the JPopupMenu).
if I do:
only the moues menu shows and I get a gray area where the JEditorPane should be.
Can someone help me so I can get both of the things at once.