Klare Zwei-Dimensionales Array

Wie lösche ich einen 6x6 "table", so dass alles, was in es gelöscht wird?
(Ich habe den clearbutton bereits mit ActionListener...etc)

        //other code above that creates window, below is the code that creates the table I need to clear

         square = new JTextField[s][s];
    for (int r=0; r!=s; r++) {
        symbols[r] = new JTextField();
        symbols[r].setBounds(35+r*35, 40, 30, 25);
        win.add(symbols[r], 0);
        for (int c=0; c!=s; c++) {
            square[r][c] = new JTextField();
            square[r][c].setBounds(15+c*35, 110+r*30, 30, 25);
            win.add(square[r][c], 0);
        }
    }
    win.repaint();
}
InformationsquelleAutor Homer Homer | 2012-10-18
Schreibe einen Kommentar