my dog learned polymorphism
The moose likes General Computing and the fly likes captured text Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » General Computing
Bookmark "captured text" Watch "captured text" New topic

captured text

Saras Thangaraju

Joined: Jan 30, 2004
Posts: 6
hi everyone....i am not too sure about this but i need to get some infor so i could work on it...any help would be gret
currently i have worked on to capture highlighted text from any desktop application using short-cuts keys on keybrd and translating the highlighted text to open another appliction....
i need to do this on the mouse do i capture the word that i have highlighted, so that its displayed on my application when i open it using right i have to know the co-ordinates of the highlighted rectangle?
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347

windows has that functionality built-in. ctrl c is copy ctrl v is paste

Visit my download page
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347

i found an example in my textbook that should help.
private JTextArea display = new JTextArea;
private String scratchpad = "";
// if whatever
scratchpad = display.getSelectedText();
I agree. Here's the link:
subject: captured text
It's not a secret anymore!