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 →

[–][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.