You could also move the creation of annonymous action listeners to a helper method if you dont want to blow up your GUI creation method.

for example something like this:

public void initGUI() {...