Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.awt.event.KeyEvent;

public class Main {
    public static void checkKeyEventId(int id) {
        if (id != KeyEvent.KEY_TYPED && id != KeyEvent.KEY_PRESSED && id != KeyEvent.KEY_RELEASED) {
            throw new IllegalArgumentException("Invalid key event id");
        }
    }
}