why cant i display values of my 2d array in my text area
<p>I have a 2d array made up of collums and rows and when computed it builds a matrix or the values in the matrix but the problem is that my text area is displaying only my final result in my 2d array and not all the others but in my console in netbeans it does display all the values How may i change my code to enable this.Below are the pieces that i think is where the problem is coming.Thank you</p>

<p>this is in my actionperform button to display the </p>

<pre><code>     for (int i =0; i &lt; rows; i++) {
       for (int j = 0; j &lt; cols; j++) {
         matrix_tf.setText(String.valueOf(matrix[i][j]));
</code></pre>

<p>and this is the code to compute my matrix</p>

<pre><code>    private void build_matrix() {
    String seq1 = sequence1_tf.getText();
    String seq2 = sequence2_tf.getText();



    int r, c, ins, sub, del;

    rows = seq1.length();
    cols = seq2.length();

    matrix = new int [rows][cols];

    // initiate first row
    for (c = 0; c &lt; cols; c++)
        matrix[0][c] = 0;

    // keep track of the maximum score
    max_row = max_col = max_score = 0;

    // calculates the similarity matrix (row-wise)
    for (r = 1; r &lt; rows; r++)
    {
        // initiate first column
        matrix[r][0] = 0;

        for (c = 1; c &lt; cols; c++)
        {
                        sub = matrix[r-1][c-1] + scoreSubstitution(seq1.charAt(r),seq2.charAt(c));
                        ins = matrix[r][c-1] + scoreInsertion(seq2.charAt(c));
                        del = matrix[r-1][c] + scoreDeletion(seq1.charAt(r));

            // choose the greatest
            matrix[r][c] = max (ins, sub, del, 0);

            if (matrix[r][c] &gt; max_score)
            {
                // keep track of the maximum score
                max_score = matrix[r][c];
                max_row = r; max_col = c;

            }


        }
    }

}
</code></pre>
