public void actionPerformed(ActionEvent e)
    {
        if(e.getActionCommand().compareTo("Copiar")==0)
        {
            if(this.getSelectedText()!=null)
               this.copy();
        }
        else if(e.getActionCommand().compareTo("Cortar")==0)
        {
            if(this.getSelectedText()!=null)
            {
                this.cut(); state = false;
            }
        }
        else if(e.getActionCommand().compareTo("Pegar")==0)
        {
            this.paste(); state = false;
        }
        else if(e.getActionCommand().compareTo("Seleccionar todo")==0)
        {
            this.selectAll();
        }
    }