Skip to main content

Issues with PopUp menu in Canvas3D

4 replies [Last post]
nachiket_patel
Offline
Joined: 2007-02-03
Points: 0

hello,
i have one JFrame Class, who is creating instance of a JPanel class(Main), and adding it.

Main has Canvas3D, i add MouseListner to Main class, and implemented with MouseListner, &

i created one PopUpMenu, which i show at specific X,Y using e.getX() and e.getY(), where e is Event, of mouseReleased(e) method.

but problem is when i click on canvas3D , no menu is visible, i tried many things & later i found that menu is behind Canvas3D, when i click on edge of canvas3D , half of the menu is visible under Canvas3D,

anyone knows why it is happening?? and how i can correct it??

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
pepe
Offline
Joined: 2003-06-10
Points: 0

please check this page:
http://java3d.j3d.org/faq/swing.html

It is not accurate and old, but the answer lies in first part of the page and is still valid.

programkarl
Offline
Joined: 2010-11-11
Points: 0

Hi,
I'm actually having the same problem. The page doesn't exist anymore. Could someone point me in the right direction?

interactivemesh
Offline
Joined: 2006-06-07
Points: 0

Hi,

call the static method 'JPopupMenu.setDefaultLightWeightPopupEnabled(false);' before creating JPopupMenu instances.

See also:

- http://java.sun.com/products/jfc/tsc/articles/mixing/
- http://java.sun.com/developer/technicalArticles/GUI/mixing_components/in...
- http://today.java.net/article/2009/11/02/transparent-panel-mixing-heavyw...

August

programkarl
Offline
Joined: 2010-11-11
Points: 0

Thanks interactivemesh!