How to read from GUI input?
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?
For example:
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
Code :
BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)
message = stdin.readLine()
;
will wait for keyboard input. What do i do for a button input?
Thank You
Re: How to read from GUI input?
Re: How to read from GUI input?
i doubt anyone will reply so just delete it