When creating a new TextArea with scala.swing, there is no right-click contextmenu nor an undo functionality with Ctrl + z. Ctrl + [acv] btw works well.
How can I add these essential text-editing features?
I’m on Scala 2.9.
Thanks in advance.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It seems that there is no support for undo on the Scala level and as such you’ll have to do it using Swing and calling the Java API. For a tutorial on how to use UndoManager, see this link.
For the popup menu, see this question on SO.