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
Post a Comment