Skip to main content

Open popupMenu only on mouse-click Swing



I have a question related with JPopupMenu that maybe someone can help me.





As far as I can see, a JPopupMenu opens when you press a JMenu (is this is in a JMenuBar) or when you hover over a JMenu (if this is in a JPopupMenu).





So, I have a JMenuBar containing a JMenu (let's call it 'File'). When I press 'File', a JPopupMenu open, which contains a JMenuItem and another JMenu (let's call it 'Properties'). Is there any way I can apply the same behaviour to the Properties JMenu as I have in the File JMenu: only opens the JPopup when the user click it and not hover over it?





I know this is trying to avoid the normal behavior for the JMenu, but any of you have an idea if this is possible?


Comments

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?