Jake Wilson wrote:Yeah, I thought the scope thing as well, but im pretty sure that its all in the same scope. I need to search through all the textboxes, get the name out of them and do a couple things to them. Nothing that requires a ton of code. So was the way that I did it the right way?
Well, it depends on the error -- is this a compile time error? or a runtime error? At compile time, if it can't find the reference, it is generally because you are using it out of scope... can you show us some code? .... And what do you mean by "pretty sure" -- either it is, or it isn't.
At runtime, how are you searching for it? The JTextField doesn't override the equals method, so the only way to find the JTextField in question, is if you already have a reference to it. It doesn't make sense to "search" for it.
Henry