Results 1 to 3 of 3
  1. #1
    DevCon is offline Member
    Join Date
    May 2011
    Posts
    2
    Rep Power
    0

    Default 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.

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default

    Read the API for javax.swing.text.TextAction.

    db

    edit: And JTextComponent.
    Last edited by DarrylBurke; 05-28-2011 at 07:38 AM.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default

    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.
    [SOLVED] Cut,Past,copy in edit menu

    db

Similar Threads

  1. JTextArea on PopUp -JTextArea isn't editable
    By Richy76 in forum AWT / Swing
    Replies: 3
    Last Post: 02-01-2010, 07:51 PM
  2. Replies: 3
    Last Post: 12-04-2009, 03:08 PM
  3. Copy, Cut and Paste Problems!
    By bones in forum New To Java
    Replies: 4
    Last Post: 07-17-2009, 10:18 AM
  4. Problems with copy paste
    By fredand44 in forum Eclipse
    Replies: 0
    Last Post: 12-17-2008, 04:14 PM
  5. How to implement Cut and Paste
    By Jamie in forum AWT / Swing
    Replies: 2
    Last Post: 05-31-2007, 06:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •