Possible Duplicate:
How to read a single char from the console in Java (as the user types it)?
I'm programming in Java and I was wondering if they're was a way to "wait" until a button is pressed before proceeding to the next part of the program. I am running this in Terminal. i.e.
Scanner in = new Scanner(System.in);
.
.
.
System.out.print("Something");
/* Wait until a button has been pressed */
System.out.println("Something Else");
Something like in.next() would wait until you've press something then press enter.
Is there a way you could wait until any button has been press (or the mouse clicked?) and then proceed to the next line. Preferably having the input not echoed to the screen (if that's possible).
So the output would be:
Something
Something Else
Thanks for all your time Any help is appreciated.