posted 20 years ago
I can't be 100% sure without seeing your code, but I imagine that you have some code like the following:
This will not compile because the frame variable is an instance variable on the MyClass class; that is, in order to have access to the frame variable, you need to first create a MyClass object to hold it. There are a couple of solutions to this problem; what you need depends on how you use the variable.
1). If the frame variable isused only in the one method, declare the frame variable inside the static method. That would look like:
2). If other methods of MyClass use the frame variable, create an instance of MyClass.
3). If you method should not be static, remove the static attribute from the method. (This doesn't work for the main method; it must be static).
[ April 09, 2003: Message edited by: Joel McNary ]
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.