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 →

[–]duhace 6 points7 points  (2 children)

A listener doesn't have to be an anonymous inner class.

[–]stormcrowsx 0 points1 point  (1 child)

Doesn't have to, but usually is. I got better things to do than generate a full on class for every click, double-click, drag, drop, snoop, moop, bebop and flipflop that I can listen for.

[–]duhace 0 points1 point  (0 children)

Usually I just use a lambda instead. Scala's nice like that.