I use JavaFX, and my application has a table, and I can add items to the table, but I want to create a context menu that appears in the row when I right-click on this row.
What have I got ...
In Scene Builder, I have a method that works when the context menu is activated, but this is not quite what I want. That would be good, because I programmatically grab the selected item from the table whenever I want. The problem is, if I save what I have, it brings up a context menu for the selected item.
contextMenu is a context menu with menu items. connectedUsers - TableView
The following is the closest I can get, but it shows the context menu at the bottom of the TableView
contextMenu.show(connectedUsers, Side.BOTTOM, 0, 0);
java javafx contextmenu
Michael scott
source share