Java packages / statsic problem - Please help!
I am writing a chat client. It has about 10 .java files so far. The problem is how to access variables, and such without having to turn everything static, which people keep saying is bad.
I have a MainClass.java file, a ChatConnection.java file, and a StatusWindow.class. How would I access the variables on StatusWindow.java from anoter file without having to put the static keyword in front of it. I do this:
In the ParentFrame (MDI) I have: statusWindow instance. I then need to access the statusWindow.append() method, but without making it static. I hope that makes sense. I have tried using a package, that is putting package name; before each file and then using import name.*; But I still cannot access any of those variables without making the statusWindow variables static.