Is there a way to wait for input from a button?
Hi guys, I hope this one will be easy for you :)
I have a client connected to a server. How can I loop the client to wait until a user presses a Jbutton?
server waits for input=>client clicks a button => sends data to server =>server replies =>client receives data and does something=>client continues to wait for a button click=>server waits for input
I know if I use
will wait for keyboard input. What do i do for a button input?
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)
message = stdin.readLine();