I just want to know how to use the Escape Key as iput for a simple program to end a do while loop like this:
import java.util.*;
public class Escape_Key{
public static void main(String args[]){
do{ System.out.println(" MENU ");
}while(); //I WANT TO END THIS LOOP WHEN THE ESCAPE KEY IS PRESSED.
}//main
}//Escape_Key