Hello, I made a command line program in which I ask to the user if he wants to visualize a certain content. If he says yes, my program shows it up and then goes to ask if he wants to see the next one. If not, it simply goes to the next. And so goes on until the file list reach it's end. But now I decided to make a gui version of my program. My idea is that the window has two buttons, one that says yes, and another that says no. The problem is that in the command line version, the Scanner.nextLine() command waited nicely until the user printed y\n, but now in the graphics version it is too fast!. If the user waits a little the program ends without showing anything (this is the standard behaviour). If he is very fast he can click the yes button and it will show up the contents of the first file, but since it is TOO fast, there isn't enough time for him to click more times in the buttons and my program end showing all files!
So what tricky can I use to retard or pause the execution?