MenuItem mi;
popup = new PopupMenu("Title Goes Here");
popup.add(mi = new MenuItem ("Undo"));
mi.addActionListener (this);
popup.addSeparator();
popup.add(mi = new MenuItem("Cut")).setEnabled(false);
mi.addActionListener (this);
popup.add(mi = new MenuItem("Copy")).setEnabled(false);
mi.addActionListener (this);
popup.add(mi = new MenuItem ("Paste"));
mi.addActionListener (this);
popup.add(mi = new MenuItem("Delete")).setEnabled(false);
mi.addActionListener (this);
popup.addSeparator();
popup.add(mi = new MenuItem ("Select All"));
mi.addActionListener (this);
add (popup);
resize(200, 200);
enableEvents (AWTEvent.MOUSE_EVENT_MASK);