Like other users have suggested above, you did not take care of array size .. and there is nothing stopping your while loop:
while (!(letter.equals (letterA[i])))
I am not much fan of while when dealing with arrays. In my opinion, this is how your outer while should look like.
while (x < message.length())
{
String text = message;
String letter = Character.toString(text.charAt(x));
x++;
for(int i=0; i<letterA.length; i++)
{
if(letter.equals(letterA[i]))if(letter.equals(letterA[i]))
{
System.out.print (letterB[i]);
break;
}
else if (letter.equals(" "))
{
System.out.print(" ");
break;
}
}
}
I tested it on my machine and it works just fine.
Input: THIS IS MY PLAINTEXT
Output: GUVF VF ZL CYNVAGRKG