Simple easy-to-use AutoTyper I have created an auto-typer that runs through a simple little GUI.This was my first ever Java program so it's pretty simple and not anything special, but I'm curious to know if there's anything that I could have done better.

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

public class AutoTyper{

    private static int interval;
    private static Timer timerMain;
    private static JTextField txtSpam;
    private static JTextField txtInterval;
    private static JButton btnStart;
    private static JButton btnStop;

    public static void main(String[]args){
        ActionListener taskSpam = new ActionListener(){
            public void actionPerformed(ActionEvent evt) {
                sendkeys(txtSpam.getText());
              }
        };
        ActionListener taskStartTimer = new ActionListener(){
            public void actionPerformed(ActionEvent evt){
                timerMain.setDelay(Integer.parseInt(txtInterval.getText()));
                timerMain.start();
                btnStart.setEnabled(false);
                btnStop.setEnabled(true);
                txtInterval.setEnabled(false);
            }
        };
        ActionListener taskStopTimer = new ActionListener(){
            public void actionPerformed(ActionEvent evt){
                timerMain.stop();
                btnStart.setEnabled(true);
                btnStop.setEnabled(false);
                txtInterval.setEnabled(true);
            }
        };

        btnStart = new JButton("Start Spam");
        btnStop = new JButton("Stop Spam");
        btnStart.setBackground(Color.BLACK);
        btnStart.setForeground(Color.GREEN);
        btnStop.setBackground(Color.BLACK);
        btnStop.setForeground(Color.GREEN);
        JLabel lbl1 = new JLabel("Text to Spam");
        JLabel lbl2 = new JLabel("Interval:");
        timerMain = new Timer(1,taskSpam);
        txtSpam = new JTextField("", 13);
        txtSpam.setBackground(Color.BLACK);
        txtSpam.setForeground(Color.GREEN);
        txtInterval = new JTextField("3000",3);
        txtInterval.setBackground(Color.BLACK);
        txtInterval.setForeground(Color.GREEN);

        btnStart.addActionListener(taskStartTimer);
        btnStop.addActionListener(taskStopTimer);
        btnStop.setEnabled(false);

        JPanel intervalpane = new JPanel();
        intervalpane.add(lbl2,BorderLayout.EAST);
        intervalpane.add(txtInterval,BorderLayout.WEST);

        JPanel bottompane = new JPanel();
        bottompane.add(btnStart,BorderLayout.EAST);
        bottompane.add(btnStop,BorderLayout.CENTER);
        bottompane.add(intervalpane,BorderLayout.WEST);

        JPanel toppane = new JPanel();
        toppane.add(lbl1,BorderLayout.EAST);
        toppane.add(txtSpam,BorderLayout.NORTH);

        JPanel pane = new JPanel(new BorderLayout());
        pane.add(toppane,BorderLayout.NORTH);
        pane.add(bottompane,BorderLayout.SOUTH);

        JFrame frame = new JFrame("Auto Typer");
        frame.setForeground(Color.BLACK);

        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setContentPane(pane);
        frame.pack();
        frame.setResizable(false);
        frame.setVisible(true);
      }

    private static void sendkeys(String text) {
        try {
            Robot robot = new Robot();
            text = text.toUpperCase();
            for(int i = 0; i &lt; text.length(); i++)
                robot.keyPress(text.charAt(i));
        robot.keyPress(KeyEvent.VK_ENTER);
        }catch(java.awt.AWTException exc) {
            System.out.println("error");
        }
    }
}
Not used variables

I don't think this variable is used:

private static int interval;


Method

If you want to type the text without having to do each letter at a time, I'd use a Map to keep track of what code relates to each letter. Something like:

  // earlier on in your class, set up the map
   private static Map&lt;Character,Integer&gt; charMap;

   static {
      charMap = new HashMap&lt;Character,Integer&gt;();
      charMap.put( ' ', 32 );
      charMap.put( 'a', 65 );
      charMap.put( 'b', 66 );
      charMap.put( 'c', 67 );
      charMap.put( 'd', 68 );
      charMap.put( 'e', 69 );
      charMap.put( 'f', 70 );

      // ... and so on until ...
      charMap.put( '0', 48 );
   }

   // now define the method to use it
   public static void sendText(String aa) {

      for ( int i = 0; i &lt; aa.length(); i++ ) {
         robot.keyPress( charMap.get( aa.charAt( i ) ) );
      }
   }


Exception Handling

In the case of creating a Robot, if you get an AWTException as you have, remember that this means no Robot was created so you can't rely on it later. 
Remember also to show the exception description. Typing "error" or "unknown error" isn't so fair for me, you can easily get the description of the exception.