public void actionPerformed(ActionEvent evt) {

    if ((evt.getSource() == ok) && Shape == "Thing") {
      if (t1.getText().isEmpty()) p.NodeInformationRecord[p.Number].Name = "Thing";
      else p.NodeInformationRecord[p.Number].Name = t1.getText().toString();
      if (t2.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[0] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[0] = Integer.parseInt(t2.getText().toString());
      if (t3.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[1] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[1] =
            85 + Integer.parseInt(t3.getText().toString());
      if (t4.getText().isEmpty()) p.NodeInformationRecord[p.Number].Size[0] = 80;
      else p.NodeInformationRecord[p.Number].Size[0] = Integer.parseInt(t4.getText().toString());
      p.NodeInformationRecord[p.Number].Size[1] = p.NodeInformationRecord[p.Number].Size[0] / 2;
      setVisible(false);
    }
    if ((evt.getSource() == ok) && Shape == "Action") {
      if (t1.getText().isEmpty()) p.NodeInformationRecord[p.Number].Name = "Action";
      else p.NodeInformationRecord[p.Number].Name = t1.getText().toString();
      if (t2.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[0] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[0] = Integer.parseInt(t2.getText().toString());
      if (t3.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[1] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[1] =
            85 + Integer.parseInt(t3.getText().toString());
      if (t4.getText().isEmpty()) p.NodeInformationRecord[p.Number].Size[0] = 80;
      else p.NodeInformationRecord[p.Number].Size[0] = Integer.parseInt(t4.getText().toString());
      p.NodeInformationRecord[p.Number].Size[1] = 3 * p.NodeInformationRecord[p.Number].Size[0] / 4;
      setVisible(false);
    }
    if ((evt.getSource() == ok) && Shape == "Place") {
      if (t1.getText().isEmpty()) p.NodeInformationRecord[p.Number].Name = "Place";
      else p.NodeInformationRecord[p.Number].Name = t1.getText().toString();
      if (t2.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[0] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[0] = Integer.parseInt(t2.getText().toString());
      if (t3.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[1] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[1] =
            85 + Integer.parseInt(t3.getText().toString());
      if (t4.getText().isEmpty()) p.NodeInformationRecord[p.Number].Size[0] = 80;
      else p.NodeInformationRecord[p.Number].Size[0] = Integer.parseInt(t4.getText().toString());
      if (t5.getText().isEmpty()) p.NodeInformationRecord[p.Number].Size[1] = 150;
      else p.NodeInformationRecord[p.Number].Size[1] = Integer.parseInt(t5.getText().toString());
      setVisible(false);
    }
    if ((evt.getSource() == ok) && Shape == "Path") {
      if (t1.getText().isEmpty()) p.NodeInformationRecord[p.Number].Name = "Path";
      else p.NodeInformationRecord[p.Number].Name = t1.getText().toString();
      if (t2.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[0] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[0] = Integer.parseInt(t2.getText().toString());
      if (t3.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[1] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[1] =
            85 + Integer.parseInt(t3.getText().toString());
      if (t4.getText().isEmpty()) p.NodeInformationRecord[p.Number].Size[0] = 150;
      else p.NodeInformationRecord[p.Number].Size[0] = Integer.parseInt(t4.getText().toString());
      if (t5.getText().isEmpty()) p.NodeInformationRecord[p.Number].Size[1] = 80;
      else p.NodeInformationRecord[p.Number].Size[1] = Integer.parseInt(t5.getText().toString());
      if (t6.getText().isEmpty()) p.NodeInformationRecord[p.Number].Size[2] = 30;
      else p.NodeInformationRecord[p.Number].Size[2] = Integer.parseInt(t6.getText().toString());
      setVisible(false);
    }
    if ((evt.getSource() == ok) && Shape == "Cause") {
      if (t1.getText().isEmpty()) p.NodeInformationRecord[p.Number].Name = "Cause";
      else p.NodeInformationRecord[p.Number].Name = t1.getText().toString();
      if (t2.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[0] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[0] = Integer.parseInt(t2.getText().toString());
      if (t3.getText().isEmpty()) p.NodeInformationRecord[p.Number].Position[1] = 200;
      else
        p.NodeInformationRecord[p.Number].Position[1] =
            85 + Integer.parseInt(t3.getText().toString());
      if (t4.getText().isEmpty()) p.NodeInformationRecord[p.Number].Size[0] = 80;
      else p.NodeInformationRecord[p.Number].Size[0] = Integer.parseInt(t4.getText().toString());
      setVisible(false);
    }
  }