OK, thanks a lot! It was nice to get some closure on this topic, eventhough it didn't solve my problem! My solution has then become like this piece of code shows...
Code:
String s;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true)
{
showDialog();
s = br.readLine();
switch(s.charAt(0))
{
case '1':
etc. That is, the user can type whatever, but I only use the first character (if possible), and at the same time uses (flushes) all other characters entered.
Thanks again
Jacob.