|
-
September 17th, 2000, 03:12 AM
#1
Cut & Copy Toolbar problem
We have an app with Cut, Copy & Paste buttons on a JToolbar. However, when text in textfield selected and press Copy or Cut textfield loses focus and nothing cut/copied. This works OK from the Edit menu though. How do we stop the toolbar stealing the focus/selection of the textfields ?
-
September 17th, 2000, 03:42 AM
#2
Re: Cut & Copy Toolbar problem
Hi there
Maybe you could try the method
yourJTextfield.requestFocus();
Try to use this on the line before you
cut,copy or paste. This will be in your event capturing method.
I think you will find that the text is still
selected when the JTextfield gets the focus back.
Good luck
Phill.
-
March 22nd, 2002, 04:47 AM
#3
Re: Cut & Copy Toolbar problem
Hi,
You have said that it is working fine from the menu. Can i have some help regarding that since i face the same problem even when i do cut/copy from Menu action.
I've also tried giving request focus to the JTextFiedl in the menu action listener for cut/copy. But still i have the problem of cut/copy.
If some text is there already the whole text is being copied or cut even if i had selected only some part of the text. Is there any solution for this.
Thanks,
Manoj.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|