public void actionPerformed(final ActionEvent e)
    {
        if (e.getActionCommand().equals("CLOSE"))
        {
            closeSelf();
        }
        else if (e.getActionCommand().equals("EXECUTE"))
        {
            Main.self.toggleReach("execute");
        }
        else if (e.getActionCommand().equals("VISREACH"))
        {
            Main.self.toggleReach("visual");
        }
        else if (e.getActionCommand().equals("CLEARTRAJ"))
        {
            hand.clearTrajectory();
        }
        else if (e.getActionCommand().equals("TAKE SNAPSHOT"))
        {
            takeSnapshot();
        }
        else if (e.getActionCommand().equals("CLEAR SNAPSHOTS"))
        {
            hand.visualProcessor.reset(hand.segc);
        }
        else if (e.getActionCommand().equals("SAVE"))
        {
            writeConfig(filename.getText());
        }
        else if (e.getActionCommand().equals("LOAD"))
        {
            loadConfig(filename.getText());
        }
    }