i have added popupmenu to the applet...based on the menu selected methods 'll be called..now the problem is,for all menu selection only a particular method is called..can anyone say me where i'm going wrong..
Some pointers: You should be adding the mouse listener to the panel, not to the popup and menu items. If you are using JDK1.5+ take a look at JComponent#setComponentPopupMenu() You should check for isPopupTrigger on mousePressed AND mouseReleased(Check out the API documentation) Please note a mouseClick=mousePress+mouseRelease. I dont see any code which checks which menu/item was selected You subclass AbstractAction and add it directly to the popup to eliminate the if/else looks for checking which menu/item was selected