Digit to words converter
int input = Integer.parseInt(rawInput);


This can throw an exception if rawInput isn't a number.



    else if(input &lt; 10)
    {
        output += ones(0);
    }
    else if(input &lt; 20)
    {
        output += teens(0);
    }
    else if(input &lt; 100)
    {
        output += tens(0);
        output += ones(1);
    }
    else if(input &lt; 1000)
    {
        output += hundreds(0);
        int temp = Integer.parseInt(rawInput.substring(1,3));
        if(temp &gt; 10 &amp;&amp; temp &lt; 20)
        {
            output += teens(2);
        }
        else
        {
            output += tens(1);
            output += ones(2);
        }

    }


Code (subroutine calls) are duplicated in the above:


If the number is less than 1000 then you call tens, teens, and ones
If the number is greater than 1000 then you call tens, teens, and ones


There would be less code if you processed it from left to right, like you do when you read and say a number:

if (input &gt; 1000)
{
    output += thousands;
    subtract thousands from input;
}
if (input &gt; 100)
{
    output += hundreds;
    subtract hundreds from input;
}
if (10 &lt; input &lt; 20)
{
    output += teens;
}
else
{
    if (input &gt;= 20)
    {
        output += tens;
        subtract tens from input;
    }
    output += ones;
}
if (output is empty)
    output = "Zero";




int temp = Integer.parseInt(rawInput.substring(1,3));


This is a complicated way to remove the thousands from the input.

A simpler way to subtract thousands from the input is:

input = input - ((input / 1000) * 1000);



main(args);


This is a strange way to loop forever.

Better would be:

public static void main(String[] args)
{
    while (true)
        run();
}

static void run()
{
    rawInput = JOptionPane.showInputDialog("Enter a number between 0 and 9999.");
    ... etc ...
}




Perhaps only the first letter should be capitalized; perhaps with hyphens; and the word "and"; for example "Four hundred and forty-three" not "Four Hundred Forty Three".