jcbergman
asked on
Copy, Cut, Paste, Select All
I have a text editor that uses a JTextArea that I've created. I have a menu bar and a toolbar. What do I need to call to use the copy/cut/page/select all features?
Obviously I can press CTRL+A to select all the text, but I cannot press my toolbar button and simulate that.
Any help will be appreciated!
Thanks
Obviously I can press CTRL+A to select all the text, but I cannot press my toolbar button and simulate that.
Any help will be appreciated!
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Maybe this link will help.
https://www.experts-exchange.com/questions/20925516/Cut-Copy-Paste-Select-All-Procedures-in-Java.html
https://www.experts-exchange.com/questions/20925516/Cut-Copy-Paste-Select-All-Procedures-in-Java.html
Action[] actions = textarea.getActions();
for (int i=0; i<actions.length; i++)
{
toolbar.add(actions[i]);
}