FileDocCategorySizeDatePackage
SelectableTextArea.javaAPI DocExample742Mon Nov 09 12:45:52 GMT 1998None

SelectableTextArea

public class SelectableTextArea extends JTextArea

Fields Summary
Constructors Summary
public SelectableTextArea(String text, int rows, int cols)

    super(text, rows, cols);
    Keymap km = getKeymap();

    // get the "Ctrl-A" key code
    // and attach it to a selectAll() call for this component
    km.addActionForKeyStroke(
      KeyStroke.getKeyStroke('A", KeyEvent.CTRL_MASK, true),
      new AbstractAction() {
        public void actionPerformed(ActionEvent ae) {
          SelectableTextArea.this.selectAll();
        }
      }
    );
  
Methods Summary