Q:

Doesn't using an anonymous class to add an action listener cause a memory leak?

Doesn't this cause a memory leak because now you cannot remove the action listener when the attacher is getting collected?
this.btnClickMe.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                textArea.append("Hello\n");
            }
        });

Wouldn't it instead be better to do this?
this.clickMeButtonActionListener = new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                textArea.append("Hello\n");
            }
        };

 this.btnClickMe.addActionListener(this.clickMeButtonActionListener);

...

@Override
public void dispose() {

    this.btnClickMe.removeActionListener(
               this.clickMeButtonActionListener);

    super.dispose();
}

A:

No.
You don't need to implement dispose and generally never should.
Your anonymous listener will be garbage collected like everything else when btnClickMe is disposed of and no more references to it exist, without you having to do anything.
If the listener is temporary then sure, store it then remove it when you're done with it logically with removeActionListener. But not in dispose, you don't even know when or if dispose will be called. Do it when your application no longer needs the listener attached.

