This seems like a bad design. Shouldn't you be adding the action to something else that calls actionPerformed?

But if you really want to go this way, there's nothing stopping you from constructing...