This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have methods defined in a Mesh class. I want to use these methods as the scrollbar is adjusted - (i.e. within the ScrollbarListener class - geo.someMethod() ) However geo is inialised in the MeshTesterGLSpace class. How can I use this object (geo) in the ScrollbarListener class?
Have a MeshTesterGLSpace instance (myMeshTesterGLSpace) in the MeshTester Class.
Call the method that initializes the geo object: myMeshTesterGLSpace.initMesh()
Then you can use the geo object as
"I can resist everything except temptation"
Joined: Sep 16, 2005
Also, what's the relationship between MeshTester and MeshTesterGLSpace? 1. Does one have an instance of the other as a field? 2. Is one passed the other in some method? 3. Is one created locally in the method of the other? There's many ways to get objects to send messages to each other.