File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
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: 4351

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: 4351

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
jQuery in Action, 3rd edition