Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Window displaced with contextMenu

acepsutAug 1 2013 — edited Aug 5 2013

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

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 2 2013
Added on Aug 1 2013
8 comments
960 views