richATrichardjones
Technical User
Hi
I have three buttons on a GUI I have designed. The first is called connect which connects to a proxy server. The second is called disconnect which disconnect and the third is called sweep which send the string sweep to the proxy server.
I have a class called ProxyServer. When I press connect I create an instance of that class. That is ProxyServer serverone = new ProxyServer();
When I press disconnect I want to delete this object. How do I do that?
When I press sweep I want to call a function called getResults() from within the proxy server class. Hence I want to call serverone.getResults(). However from within the sweepListener it does not recognise serverone. At the moment each button has its own listener so everything is independent. What I want to do is have serverone recognisable for each button listener. Therefore I can get the restuls and also delete the object. How do I do this?
Thanks for any help
Richard
I have three buttons on a GUI I have designed. The first is called connect which connects to a proxy server. The second is called disconnect which disconnect and the third is called sweep which send the string sweep to the proxy server.
I have a class called ProxyServer. When I press connect I create an instance of that class. That is ProxyServer serverone = new ProxyServer();
When I press disconnect I want to delete this object. How do I do that?
When I press sweep I want to call a function called getResults() from within the proxy server class. Hence I want to call serverone.getResults(). However from within the sweepListener it does not recognise serverone. At the moment each button has its own listener so everything is independent. What I want to do is have serverone recognisable for each button listener. Therefore I can get the restuls and also delete the object. How do I do this?
Thanks for any help
Richard