• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cut and Paste and Focus  RSS feed

 
Tim Williams
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please can somebody point me in the right direction...
If I have JTextArea which I am using as a text editor how can I support menus and icons for cut and paste where the selected text does not automatically lose focus?
I select text then choose my menu option, but I instantly lose the text selection.
I am not looking for the full code but a strong hint would be very helpful.
Thanks,
Tim.
 
Antony Julian
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Williams
Insted of going for menu, you can use Jpopupmenu.
There you can use cut,copy paste and other functions.
Regards
Antony
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!