JTextArea Paste function
Hi, I am trying to create an application that has several JTextAreas. It also has a JMenuBar with Cut/Copy/Paste options. The problem is I do not know how to tell the paste menu action listener which JTextArea has the cursor so that it knows which JTextArea to paste the clipboard contents into. Can anybody help with this? Thanks in advance.
Read the API for javax.swing.text.TextAction.
edit: And JTextComponent.
What was the need to cross post this? Or do you feel you shouldn't be expected to look up the API?
JTextArea (Beginning Java forum at JavaRanch)
In fact, if you had taken the trouble to search the forum, this question has earlier been answered in depth.