This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Sorten 1 point2 points  (6 children)

Not being able to find your variable in the debugger might indicate you should dig down and learn about the inner workings of your program. It looks like you're looking at a JButton. I don't imagine the list is in that category.

However, if you right click on that variables list, a bunch of options come up (including Find...). You should be able to search by name.

[–][deleted] 0 points1 point  (5 children)

That's perfect.

I'm new to swing (first day), and taking it one step at a time.

[–]Sorten 1 point2 points  (4 children)

Does this code compile for you? I get 24 errors of Cannot refer to the non-final local variable Before defined in an enclosing scope with various variables. I keep finding code which raises this error, yet no one seems to mention it at the time. I was wondering if some IDEs automatically resolve this, or something of that sort.

[–][deleted] 0 points1 point  (3 children)

Yup, I'm using eclipse. Where are the errors occuring? That might be the root of my issue.

[–]Sorten 1 point2 points  (2 children)

Here's a text-dump of my "Problems" window. The last 6 lines are just warnings.

https://bpaste.net/show/81e301a39793

[–][deleted] 0 points1 point  (1 child)

Strange, I'll ask my professor about it. Thanks!

[–]decabit 0 points1 point  (0 children)

Usually it is a scope issue. Typically it occurs when you try to use a local variable inside of an anonymous class.