FileDocCategorySizeDatePackage
CutAndPaste.javaAPI DocExample4598Mon Apr 06 18:10:22 BST 1998None

CutAndPaste

public class CutAndPaste extends Frame

Fields Summary
MenuBar
mb
Menu
edit
MenuItem
cut
MenuItem
copy
MenuItem
paste
TextArea
text
Clipboard
clipbd
Constructors Summary
public CutAndPaste()

    
    cut.addActionListener(new CutL());
    copy.addActionListener(new CopyL());
    paste.addActionListener(new PasteL());
    edit.add(cut);
    edit.add(copy);
    edit.add(paste);
    mb.add(edit);
    setMenuBar(mb);
    add(text, BorderLayout.CENTER);
  
Methods Summary
public static voidmain(java.lang.String[] args)

    CutAndPaste cp = new CutAndPaste();
    cp.addWindowListener(
      new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
          System.exit(0);
        }
      });
    cp.setSize(300,200);
    cp.setVisible(true);