Network GUI
I am trying to write a method that connects to a server retrieves some information and returns a Socket object, while at the same time showing a GUI, which displays information about the networking process. This method needs to be called when a button is pressed in a seperate GUI. The Socket object must only return when the appropriate information is received from the server. I have tried many different ways of implementing this using threading etc., but yet the GUI's always become unresponsive, however, this method works if it is called by itself, instead of being called when a button is pressed. Any ideas would be greatly appreciated.

