I would just generate a random number between 33 & 126. Then every couple of char's randomly add a 32. 32 is a space. 65 - 90 are upper case, and 97-122 are lower case.
Good resource: http://www.asciitable.com/
To generate a random number I would:
Random randomGenerator = new Random();
int ran = randomGenerator.nextInt(126 - 33);
ran += 33;
Then ran would be your random character. You could have a loop and do that a couple times.
You don't even need to use KeyEvent.VK_SPACE. If you use:
System.out.println(KeyEvent.VK_SPACE);
You will get a return of "32". That corresponds to the ASCII chart, just use that.