Example usage for java.awt.event KeyEvent VK_BACK_SPACE

List of usage examples for java.awt.event KeyEvent VK_BACK_SPACE

Introduction

In this page you can find the example usage for java.awt.event KeyEvent VK_BACK_SPACE.

Prototype

int VK_BACK_SPACE

To view the source code for java.awt.event KeyEvent VK_BACK_SPACE.

Click Source Link

Document

Constant for the BACK_SPACE virtual key.

Usage

From source file:ecorecyclesimulator.RmosGUI.java

private void validateForInteger(char input, java.awt.event.KeyEvent e) {

    if (!(Character.isDigit(input)) || (input == KeyEvent.VK_BACK_SPACE) || (input == KeyEvent.VK_DELETE)) {
        getToolkit().beep();//from  w  w w .j  a v  a2 s.  c o  m
        e.consume();
    }
}