Example usage for java.awt Button addKeyListener

List of usage examples for java.awt Button addKeyListener

Introduction

In this page you can find the example usage for java.awt Button addKeyListener.

Prototype

public synchronized void addKeyListener(KeyListener l) 

Source Link

Document

Adds the specified key listener to receive key events from this component.

Usage

From source file:Align_Projections.java

Button addButton(String label) {
    Button b = new Button(label);
    b.addActionListener(this);
    b.addKeyListener(IJ.getInstance());
    add(b);/*from   w w  w  . j  av  a2  s.co m*/
    return b;
}