Fri Oct 24, 2008 5:32 pm
I've written an application that contains several editable JTextAreas
and JTextFields. It also has a menu bar. I've written code to copy
and paste with menu bar commands. I'm having problems with the paste.
The problem is getting the application to choose the correct text
element in which to insert the clipboard text. I want it to go to the
text field or area where I have clicked the mouse and inserted a
visible cursor. Normal windows text editing behavior.
What I know wont work:
- Choosing the textarea with focus. Focus goes to the menubar by
clicking edit/paste.
- Locating the text caret, getCaret(). All the text elements have
one, I want the cursor, not the caret.
I'm sure there must be a simple api, but I can't find it. Any ideas
would be appreciated
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.