Java Swing Menú Haga clic en Evento

JMenuItem menuItem = new JMenuItem(new AbstractAction("My Menu Item") {
    public void actionPerformed(ActionEvent e) {
        // Button pressed logic goes here
    }
});
Soulless Creature