On Tue, 2 Mar 1999, Hock, Gregg wrote:
> Hi again everyone,
> I tried the archived solutions to this problem but without any luck.
> Does anyone have a solution for using JMenuBar, Jmenu and JMenuItem(s) in
> Java3D (app or applet)?
> My problem is with getting the JMenuItems to appear. Is the Canvas3D the
> culprit or Java3D in general?
Yup, I had this problem - why oh why don't they give us a light weight
Canvas3D? The problem is that when you mix lightweight and heavyweight
components, the heavyweights seem to exhert themselves to the top of the
drawing order. Anyway. I solved it as follows, you need to disable the
lightweight popups on each JMenu. So your menu creation code looks like
this:
JMenuItem mi = new JMenuItem();
JMenu file = (JMenu) menubar.add(new JMenu("File"));
mi = (JMenuItem)file.add(new JMenuItem("Open"));
mi = (JMenuItem)file.add(new JMenuItem("Save")):
file.getPopupMenu().setDefaultLightWeightPopupEnabled(false);
Now, what I want to know is can anyone work out how to grab the popup from
the tooltip of a JButton so the same can be done?
Tim.
,----------------------------------------------------------------------.
| Tim Needham. |
| OU Computer Society President. |\ ___,,--,_ __ |
| [EMAIL PROTECTED] /,`--'' \`,,__,',-'|
| http://ox.compsoc.net/~timothy |,4 ) )_ ) /~-----' |
`------------------------------------------'---^~(_/-_)--(_/_)---------'
Q: What do you get if you cross a horse with a mountain climber!
A: You can't. A mountain climber is a scalar.
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/