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 actTitre3 extends AbstractAction{ /** * */ private static final long serialVersionUID = 1L; { putValue( Action.NAME, "Titre 3" ); putValue( Action.SHORT_DESCRIPTION, "Titre 3" ); } @Override public void actionPerformed(ActionEvent e) { nodeAC nod = (nodeAC) fenetres.create.getSelectNode().getUserObject(); String titre = ""; if(nod.getAttributs().get("titre3")!=null) { titre = nod.getAttributs().get("titre3"); } String a = JOptionPane.showInputDialog(null,"Quel est le titre?",titre); nod.titre3(a); fenetres.create.getTextNodeSelect().refreshAffichage(nod); } }