Results 1 to 3 of 3
Thread: JTextArea Paste function
- 05-28-2011, 05:28 AM #1Member
- Join Date
- May 2011
- Rep Power
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.
- 05-28-2011, 06:33 AM #2
Read the API for javax.swing.text.TextAction.
edit: And JTextComponent.
Last edited by DarrylBurke; 05-28-2011 at 07:38 AM.
- 05-28-2011, 09:45 AM #3
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.
- By Richy76 in forum AWT / SwingReplies: 3Last Post: 02-01-2010, 08:51 PM
- By TreyAU21 in forum Advanced JavaReplies: 3Last Post: 12-04-2009, 04:08 PM
- By bones in forum New To JavaReplies: 4Last Post: 07-17-2009, 10:18 AM
- By fredand44 in forum EclipseReplies: 0Last Post: 12-17-2008, 05:14 PM
- By Jamie in forum AWT / SwingReplies: 2Last Post: 05-31-2007, 06:15 PM