public static Color getRandomColor() {
      Color result = Color.BLACK;

      // random number between 0 (inclusive) and 9 (exclusive)
      switch (random.nextInt(9)) {
         case 0:
            result = Color.BLUE;
            break;
         case 1:
            result = Color.CYAN;
            break;
         case 2:
            result = Color.GREEN;
            break;
         case 3:
            result = Color.LIGHT_GRAY;
            break;
         case 4:
            result = Color.MAGENTA;
            break;
         case 5:
            result = Color.ORANGE;
            break;
         case 6:
            result = Color.PINK;
            break;
         case 7:
            result = Color.RED;
            break;
         case 8:
            result = Color.YELLOW;
            break;
      }

      return result;
   }