![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> I've gotten it to work more or less correctly, but I'm having trouble with methods in the instance that access non-static variables: > The pertinent code follows:
I don't see the pertinent part; you said "I'm having trouble with methods in the instance that access non-static variables," but I don't see any methods besides the constructor and the only non-static variable I see is gui , which isn't accessed anywhere in the sample. The only bug I see is that you are prefixing a class variable with "this." which probably doesn't compile; you should have manager = this; in place of this.manager = this; Note that if you have some static Usually, if you really want a singleton, you'd make the constructor private (you probably already know this, since you did mention that it is not precisely a singleton). Replies: |
Sponsored Links
|