How to input numbers into a cell of a table?
<p>So far I wrote code that makes a table looking kind of like the table from excel and I am able to input letters words when it compiles, but I cant say for example 1a equals 5 and make the cell in 1a show 5 inside it.this is what my table looks like so far. This is my code to draw up the table:</p>

<pre><code>package table;

public class Spreadsheat {

    private int xVal = 137;
    private int yVal = 1;
    private int[][] table = new int [20][20];
    private char yaxis = 'A';
    private int xaxis = 0;


    public Spreadsheat(){
        for(int i = 0; i &lt; xVal; i++){
            System.out.print("-");
        }

        System.out.println();
        System.out.print(" |");
        for(int i = 0; i &lt; 17; i++){
            System.out.print("| " + yaxis + "\t" + "|" );
            yaxis = (char) (yaxis + 1);
        }

        System.out.println();
        for(int i = 0; i &lt; xVal; i++){
            System.out.print("-");
        }

        System.out.println();
        for(int j = 0; j &lt;10;j++){
            System.out.print(" " + xaxis + "|");
            for(int i = 0; i &lt; 17; i++){
                System.out.print("|" + "\t" + "|" );
            }

            System.out.println();
            xaxis = xaxis + 1;
        }
    }
    public void setxval(int xVal) {
        this.xVal = xVal;
    }
    public int getxVal() {
        return xVal;
    }
    public void setyVal(int yVal) {
        this.yVal = yVal;
    }
    public int getyVal() {
        return yVal;
    }
    public void setTable(int table[][]) {
        this.table = table;
    }
    public int[][] gettable() {
        return table;
    }
}
</code></pre>

<p>And this is my client program:</p>

<pre><code>package Client;

import java.util.Scanner;

import table.Spreadsheat;

public class VisiCalc {
    public static void main(String[] args){
        Scanner kb = new Scanner(System.in);
        Spreadsheat table = new Spreadsheat();
        boolean end = false;
        while(end == false){
            String input = kb.next();
            System.out.println(input);
            if(input.contains("quit")){
                end = true;
            }
        }

    }

}
</code></pre>
