namaste gurus, i hv attached a popup menu to a Jdialog. This popumenu shd pop up whn i right clk the mouse but in my case it pops up evn wth left click of a mouse. i hv used pop.show( me.getComponent(), x, y); whr x = me.getX() and y = me.getY(). this code is wrtn in mousePressed() whts the matter? pl. help...
posted 16 years ago
Dear Remi, please have a look here: How to Use Menus (go under the "Bringing up a popup menu" paragraph). You'll see you have to use the isPopupTrigger() method of the MouseEvent to decide whether to call show() or not. If you do not, then it happens on each mouse event... 'gld 2 hlp'... [This message has been edited by PierreArnaud Galiana (edited June 25, 2001).]