From: guillaume D. <gui...@ne...> - 2002-07-14 22:54:26
|
On Thu, 11 Jul 2002 09:51:58 +0200 "Alban Cousinie" <aco...@wa...> wrote: > GLAnimCanvas is an awt and heavyweight component. > > JMenus are swing and lightweight components. > You may have 2 other alternatives : > > - Use an awt menu wich should be heavyweight and should display > properly (I am not sure about this, you have to make a test. If you do > it, please let me know how it works). > > - Draw the menu yourself in OpenGL at the right place : see > MiscDemos\tessdemo.html for an exemple. i read the example, it s not what i want. using awt components worf fine in this way: class GLTestMenu extends MenuBar { /* liste des objets que je vais utiliser */ Menu myMenuFile; Menu myMenuHelp; MenuItem myMenuItemAbout; /* constructor */ GLTestMenu() { myMenuFile = new JMenu("File"); this.add(myMenuFile); myMenuHelp = new Menu("Help"); this.add(myMenuHelp); myMenuItemAbout = new MenuItem("About"); myMenuHelp.add(myMenuItemAbout); } /* methodes */ } but AWT Menu is not very beautifull compared to Swing. i m trying another way with setDefaultLightWeightPopupEnabled(boolean) that Jiba told. if it works and someone is interested, i'll post it. thanks you two for your help, -- guillaume |