package fenetres.create_act; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.JOptionPane; import nodeAC.nodeAC; public class actTitre2 extends AbstractAction{ /** * */ private static final long serialVersionUID = 1L; { putValue( Action.NAME, "Titre 2" ); putValue( Action.SHORT_DESCRIPTION, "Titre 2" ); } @Override public void actionPerformed(ActionEvent e) { nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject(); String titre = ""; if(nod.getAttributs().get("titre2")!=null) { titre = nod.getAttributs().get("titre2"); } String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre); nod.titre2(a); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } }