So I have created a contextMenu and disabled the default contextMenu for textFields in my application.
I am already able to open the contextMenu that I have created with a right click on the textField.
My problem now is how can i edit the textField when I select a menuItem?
For example I have an "S" as content in my textField and I want to change it to an "A" with my menuItem.
It should work as if i select the textField and press "A" on the keyboard.
Asked
Active
Viewed 280 times
0

Yupp
- 315
- 3
- 18
-
What code have you tried? Without seeing what you have attempted it's difficult to provide help. Please post your code of your example, what is working and where you need help. Please see this page - https://stackoverflow.com/help/mcve – purring pigeon Nov 15 '17 at 15:19
-
Possible duplicate: https://stackoverflow.com/questions/29149098/javafx-contextmenu-how-do-i-get-the-clicked-object – SedJ601 Nov 15 '17 at 15:19
-
Thank you. I could solve the problem with the solution from the link. Sorry for not posting my code. I will do it the next time. – Yupp Nov 20 '17 at 08:05