JOptionPane.showMessageDialog((Component)e.getSource(), "A workflow with the name " + name + " already exists.", "Error adding workflow", JOptionPane.ERROR_MESSAGE);
JOptionPane.showMessageDialog((Component)e.getSource(), ResourceManager.getString("createflow.error", new Object[]{name}), ResourceManager.getString("createflow.error"), JOptionPane.ERROR_MESSAGE);
  public void actionPerformed(ActionEvent e)  {    String name = JOptionPane.showInputDialog("Create Workflow", "Please specify a new workflow name");    if(name==null) return;    try    {      if(currentWorkspace.getWorkflow(name)!=null)      {        JOptionPane.showMessageDialog((Component)e.getSource(), "A workflow with the name " + name + " already exists.", "Error adding workflow", JOptionPane.ERROR_MESSAGE);        return;      }    }    catch(FactoryException ex)    {      log.error("Error creating definition:" + ex.toString());      return;    }    currentWorkspace.createWorkflow(name);    WorkflowDesigner.INSTANCE.newWorkflowCreated(name);  }