I am trying to display lines of File objects e.g., File, Directories on the console one line per object. I want to display only up to a number of lines e.g., 20 lines. After 20 lines, I want to display the message "more". After the user press any key, the display will continue (scroll up). I am able to display up to 20 lines as well as the message "more". However, I'm having a problem when I'm pressing any key (except ENTER) in order to scroll up. The display doesn't scroll up when I press any key. Is there a way to capture any keyboard input in Java? Thanks.