When u want to test the swing , java console can show some info by system.out.print.
Go to start - > Control panel, then select Java control panel and open it.
Select Advanced option,then u can see Java console, select "Show console" then press "OK" button
by the way,a useful note for listening the operation: press the enter key
js: οnkeydοwn="javascript:if(event.keyCode == 13){ logon();}"