i want to implement cut, copy, paste n select all option for JTextPane........ By using this statement below..... Clipboard clipbd = Toolkit.getDefaultToolkit().getSystemClipboard() these operations r getting implemented through.. Ctrl-X, Ctrl-C, Ctrl-V, Ctrl-A... but my problem is how to implement them through ActionListener..... that is when a user clicks the buttons of cut, copy, paste...n select..etc..
You would just call the cut(), copy(), and paste() methods of your JTextPane in the action listener...
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Dec 28, 2001
i am glad to receive a reply to my query but i am very sory to say that i am not able to find any such methods of cut(), copy(), paste(), selectall() in JTextPane....i have also looked into the site of java.sun.com....... may be that thing has got slipped off by me.. then it is requested to plz clear ur point with specifying some example.....telling how to implement it.. thanx