input - Java check if user is typing in the console -


is there way check if user typing in console window in java? program prints information receives client connections using system.out.print() , want stop printing information temporarily while user typing. user input read on separate thread using scanner class. need able see if user has typed , still have whatever user has typed (if anything) available scanner. if it's possible avoid using external libraries , stick java libraries.

no, there no ways directly using console (that i'm aware of) - content of console sent application once enter pressed , available scanner.

one way solve make own console, can read , write from. you'll able want (including check if highlighted , on). if don't know how code gui, should that. oracle has tutorial on gui swing.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -