code: public void setPattern(String[] pattern)
      {
          if (pattern.length != Sudoku.SIZE)
          {
              throw new IllegalArgumentException("Pattern must have " + Sudoku.SIZE + " rows.");
          }
          for (int row = 0; row < pattern.length; row++)
          {
              String patternRow = pattern[row];
              if (patternRow.length() != Sudoku.SIZE)
              {
                  throw new IllegalArgumentException("Row must have " + Sudoku.SIZE + " columns.");
              }
              for (int column = 0; column < patternRow.toCharArray().length; column++)
              {
                  char c = patternRow.toCharArray()[column];
                  cells[row][column] = c == '.' ? null : c;
              }
          }
          sudoku = null;
          puzzleMode = true;
          fireTableRowsUpdated(0, getRowCount() - 1);
      }
docs: Sets all cells at once using the same patterns as supported by
  {@link SudokuFactory}.
  @param pattern A String representation of a Sudoku puzzle.  Each element
  in the array represents a single row.  There are 9 elements and each has 9
  characters, one per cell.  Number cells are represented by the characters
  '0' to '9' and blank cells are represented by dots.