Ok!!i have a 2d array..n i created a letterTray which is taking 7 letters from the letterbag which was already created..now in the JoptionPane in the String by giving 3 numbers..the 3 numbers will represent the row number, column number and the letter number..how do i do it??here is my code

 ScrabbleLetterBag SBag = new ScrabbleLetterBag(); 
    String strInput;
    int row;
    int col;
    int letter;
    int[][] Board = new int[15][15];
    for (int p = 0; p < 15; p++) {
        if (p > 9)
            System.out.print(" " + p);
        else
            System.out.print("  " + p);
    }
    System.out.print("\n");
    for (int r = 0; r < Board.length; r++) {
        System.out.print(r);
        for (int c = 0; c < Board[r].length; c++) {
            System.out.print("__" + " ");
        }
        System.out.println();
    }
  char letterTray[] =new char[7];
    for(int y=0;y<7;y++)
        System.out.print((y)+" ");
System.out.print("\n");
    for (int x = 0; x<7; x++) {
        letterTray[x] = SBag.getLetter();
        System.out.print(letterTray[x]+" ");
        }
strInput=JOptionPane.showInputDialog("Enter the location number");



}

I need to use StringTokenizer how u use it?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.