I have a contextMenu with 3 menuItems on a window
ContextMenu cm = new ContextMenu();
MenuItem item1 = new MenuItem("Chart Settings");
MenuItem item2 = new MenuItem("Technical Analysis Tools");
MenuItem item3 = new MenuItem("Drawing Tools");
cm.getItems().addAll(item1, item2, item3);
internalWindow.setContextMenu(cm);
where
Window internalWindow = new Window(" My Window # " + counter);
When I right mouse click on the window the contextMenu appears, but if I left mouse click anywhere on the window to close the contextMenu the windows get displaced, such as the pictures below
http://s16.postimg.org/nxccgwb79/Z081.png
http://s21.postimg.org/3k8jkf5yv/Z082.png
Is there a way so when I left mouse click anywhere on the chart, the window does not get displaced?
Thanks