Originally posted by kay jee:
I have an editor using JTextArea. I want to add cut , copy , paste options on right click.
How can I go about it.
JTextArea (and all JTextComponents) support cut/copy/paste via the keyboard (ctrl-x, ctrl-c, ctrl-v on most LnFs) by default.
They also have simple cut(), copy(), and paste() methods. If you want a right-click popup menu, you can create menu items to call those three methods and put them in a JPopupMenu. There is some JPopupMenu information in the
java tutorial.