JPopUpMenu

I am trying to extends JPopUpMenu

hee is my code

publicclass RightClickMenuextends JPopupMenu

{

public RightClickMenu(JComponent aComp,int x,int y)

{

this.show(aComp, x, y);

theComp = aComp;

JMenuItem copy =new JMenuItem("CopyCtrl C");

copy.addActionListener(new CopyListener());

JMenuItem copyLine =new JMenuItem("Copy LineCtrl L");

copyLine.addActionListener(new CopyLineListener());

JMenuItem paste =new JMenuItem("PasteCtrl V");

paste.addActionListener(new PasteListener());

if(aCompinstanceof MyTable)

{

this.add(copy);

this.add(copyLine);

this.add(paste);

}

else

{

this.add(copy);

this.add(paste);

}

}

private JComponent theComp;

}

is there a reason why when i create new instance of this class nothing will appears on the screen.

did i forget something? is the method .show(aComp, ax, ay) enougth to pop up the jpopupmenu ?

[1835 byte] By [lildavesflavaa] at [2007-11-27 5:10:22]
# 1
problem solve i put the show statement at the end instead of at the beginning of the class sorry for this post
lildavesflavaa at 2007-7-12 10:30:27 > top of Java-index,Desktop,Core GUI APIs...