public void edit(InitVariableAction var) {
   variable = var;
   if (editor != null) varEditPane.remove((EditorPanel) editor);
   var.addVariableListener(variableListener);
   editor = var.getVariableEditor();
   varName.setText(var.getName());
   varName.repaint();
   if (editor != null) {
     editor.edit(var.getNewInitialization());
     varEditPane.add((EditorPanel) editor, BorderLayout.CENTER);
     varEditPane.revalidate();
     varEditPane.repaint();
   }
 }
 public void save() {
   if (editor != null) editor.save();
 }