• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Paste inserts 2 copies of clipboard

 
David A. Smith
Greenhorn
Posts: 9
Eclipse IDE Linux Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a text field that I want to support the ^C and ^V conventions for copy and paste. The problem is that I get *two* copies of whatever was in the clipboard. The code is so simple that I would think there's not much to go wrong. But clearly I'm wrong... Anyway, the JVM is 1.6.0_18 on a Linux box.

Here's the code:



Thanks,

Dave.
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The copy,cut,selectAll and paste actions are already supported via key bindings. In reinventing the wheel, you've ended up with a bicycle.
 
Rob Camick
Ranch Hand
Posts: 2565
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:In reinventing the wheel, you've ended up with a bicycle.


I like that
 
David A. Smith
Greenhorn
Posts: 9
Eclipse IDE Linux Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, thanks...? I'll have to try on different versions/platforms. I'm getting inconsistent behaviors and reports from some users that it doesn't work. (Perhaps an older JDK behaves differently...) Still, thanks for the (humorous!) reply.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic