请帮助----线程“ AWT-EventQueue-0”中的异常java.lang.ArrayIndexOutOfBoundsException:索引1超出长度1的范围

我正在做我的课程,并且在不使用诸如pendown或clear之类的参数变量的文本框中输入命令时,始终出现此错误。我环顾四周,找不到任何可以帮助我解决问题的方法。任何帮助,将不胜感激。

如果可能的话尽快回复,因为我离开工作已经很晚了

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;
import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JTextField;


import uk.ac.leedsbeckett.oop.TurtleGraphics;

public class GUIinterface extends JFrame
{

    TurtleGraphics tg;
    JMenuBar myMenuBar;
    JMenu file;
    JMenu help;
    JMenuItem load;
    JMenuItem save;
    JTextField commandTF;

    String command;
    int parameter;
    String[] sut;

    public GUIinterface()
    {

        FlowLayout layout = new FlowLayout();
        setLayout(layout);

        tg = new TurtleGraphics();
        add(tg);
        tg.about();

        JTextField commandTF = new JTextField();
        commandTF.setText("");
        commandTF.setColumns(20);
        add(commandTF);
        commandTF.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent event) {
                System.out.println("The entered command is: " + commandTF.getText());

                if(event.getSource()==commandTF) 
                {
                    command = commandTF.getText();
                    command = command.toLowerCase();
                    sut = command.split(" ");
                    command = sut[0];
                    parameter = Integer.parseInt(sut[1]);

                    System.out.println("command typed: "+command);
                    if(command.equals("pendown")==true) 
                    {
                        tg.penDown();
                    }
                    else if(command.equals("forward")==true) 
                    {
                        tg.forward(parameter);
                    }
                    else if(command.equals("penup")==true) 
                    {
                        tg.penUp();
                    }   
                    else if(command.equals("clear")==true) 
                    {
                        tg.clear();
                    }   
                    else if(command.equals("reset")==true) 
                    {
                        tg.reset();
                    }   
                    else if(command.equals("turnleft")==true) 
                    {
                        tg.turnLeft(parameter);
                    }   
                    else if(command.equals("turnright")==true) 
                    {
                        tg.turnRight(parameter);
                    }   
                    else if(command.equals("setxpos")==true) 
                    {
                        tg.setxPos(parameter);
                    }   
                    else if(command.equals("setypos")==true) 
                    {
                        tg.setyPos(parameter);
                    }
                    else if(command.equals("getxpos")==true) 
                    {
                        tg.getxPos();
                    }
                    else if(command.equals("getypos")==true) 
                    {
                        tg.getyPos();
                    }
                    else if(command.equals("about")==true) 
                    {
                        tg.about();
                    }
                    else if(command.equals("getdirection")==true) 
                    {
                        tg.getDirection();
                    }

                    commandTF.setText("");
                }
            }
        });

        setTitle("Turtle Graphics");
        setSize(700,600);
        setLocationRelativeTo(null);
        setDefaultCloseOperation(EXIT_ON_CLOSE);


        JMenuBar myMenuBar = new JMenuBar();
        JMenu file = new JMenu("File");     
        JMenu help = new JMenu("Help");     
        JMenuItem load = new JMenuItem("Load");
        JMenuItem save = new JMenuItem("Save"); 


        file.add(load);
        file.add(save);

        myMenuBar.add(file);
        myMenuBar.add(help);


        add(myMenuBar);



        setJMenuBar(myMenuBar);
        setVisible(true);

    }

    private class myActionListener implements ActionListener 
    {
        public void actionPerformed(ActionEvent e) 
        {
            if(e.getSource()==load) 
            {
                System.out.println("load pressed");
            }
            if(e.getSource()==save) 
            {
                System.out.println("save pressed");
            }


        }


    }


}