*/
protected class TreeNodeAdder implements ActionListener {
public void actionPerformed(ActionEvent e) {
// Prompt for the node name
NameEditorDialog nameEditorDialog = new NameEditorDialog(
DOMViewer.this);
nameEditorDialog.setLocationRelativeTo(DOMViewer.this);
int results = nameEditorDialog.showDialog();
if (results == NameEditorDialog.OK_OPTION) {
Element elementToAdd = document.createElementNS(
SVGConstants.SVG_NAMESPACE_URI, nameEditorDialog
.getResults());
if (rightPanel.getComponentCount() != 0) {
rightPanel.remove(0);
}
rightPanel.add(elementPanel);