This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Copy Text By mouse Event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Copy Text By mouse Event" Watch "Copy Text By mouse Event" New topic
Author

Copy Text By mouse Event

Rohan Kalbhor
Ranch Hand

Joined: Aug 18, 2006
Posts: 78
Hello all,
Suppose i am working on any editor,say for example notepad
and i have a text area on my frame
suppose i have to copy the text from the editor to my frame's text area
just by ....i select the text on the editor by dragging the mouse cursor
on it.as soon as i release the cursor over the editor the selected text is
automatically copied into my text area.
in short.....select and directly paste event


Thanks in Advance
Rohan Kalbhor


..............................<br />Exceptions are a part of possibility<br />Errors are a part of truth<br />................................
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36598
    
  16
I could never get them to work, but there are several examples of "drag and drop" in the Java Tutorial. Are those any help?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Copy Text By mouse Event
 
Similar Threads
Control transfer between Two Textareas
How would i break this down into seperate metods?
How to get the char index under the mouse cursor in a JTextComponent?
In Text Area, how to find the cursor location and insert
Drag and Drop