Results 1 to 9 of 9

Thread: Cut, Copy, Paste...

  1. #1

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Talking Cut, Copy, Paste...

    I did a search for this and found a dead link, so I'll ask again.

    How do I incorporate cut/copy/paste code into a JTextArea/JTextField?

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  2. #2
    Without implementing native code I don't think you can use a global clipboard (JDK 1.4 includes this functionality I think but it is still in beta).

    Have you tried http://forums.java.sun.com/ ?

  3. #3
    DaoK
    Guest
    java sun website help is horrible. MSDN is better than Sun help that one advantage than Microsoft have. I cant find any help at Sun webpage

  4. #4
    That was a link to their forums, and their forums are (almost as) cool (as VBF).

  5. #5
    DaoK
    Guest
    They have about 25 forums that mixed me up anyway I like vbforums because it's the best

  6. #6
    I always use the newbie's forum there.

  7. #7
    DaoK
    Guest
    4356 posts and i bet than 4100 = help and only 200 was questions

  8. #8
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    Actually the Sun forumns are quite good. I like the fact that
    each forumn is specialized, plus you get a quick response.
    Also the "Duke Dollar" system works out quite nicely becuase the
    people who answer the question that was asked the best get
    the money. Here you get a post regardless of what you post of how helpfull you answer actually was.

  9. #9
    Dazed Member
    Join Date
    Oct 1999
    Location
    Ridgefield Park, NJ
    Posts
    3,418
    This would be an example. public void copy(), public void cut(), public void paste(); are defined in the JTextComponent class;

    Code:
       JTextArea ta = new JtextArea(); 
    
       public void  cutText() {ta.cut() ;}
       public void  copyText() {ta.copy() ;}
       public void  pasteText() {ta.paste() ;}

Posting Permissions

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



Click Here to Expand Forum to Full Width