testing user input with Swing