Accessing variables between classes?
I am currently building an instant messaging client server application and have hit a brick wall as far as I can see....I was wondering if someone could help?
I have an initial class that takes user input via a textArea and a seperate class that gets fired off on the click of the submit button which handles all the socket stuff. Now I have all the communication working via command line but how can I get the variables (message) back to the initial class (gui) each time a message is sent between 2 user? The only way I know how to get variables between classes is via constructors....
Should I merge the two classes or what?
Thanks in anticipation
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL