I'm having problems with the ActionEvent on jMenuItems. I want that when you click on the menuitem, a form window opens. The problem with my code is that when you click for the first time it dosen't do anything, for the second time it does open the window. But, then if you click for a third time it opens two instances of the window, and so on.

For example:
this is the code for an action performed on a menu item:

private void MenuAltaEmpleadoActionPerformed(java.awt.event.ActionEvent evt) {
AltaEmpleadoAction aea = new AltaEmpleadoAction("Alta Empleado",null, new String("Da de alta un empleado en el sistema"),new Integer(3));


and this is the AltaEmpladoAction class:

public class AltaEmpleadoAction extends AbstractAction {

/** Creates a new instance of AltaEmpleadoAction */
public AltaEmpleadoAction(String text, ImageIcon icon,
String desc, Integer mnemonic) {
super(text, icon);
putValue(SHORT_DESCRIPTION, desc);
putValue(MNEMONIC_KEY, mnemonic);

public void actionPerformed(ActionEvent e) {
AltaEmpleado a = new AltaEmpleado();



PD: sorry about my english