I'm drawing a JTextFields matrix (15 X 15) on JFrame's container (null layout). The problem is that I see each JTextField being drawn one by one, slowly. And the JTextFields only is shown if I put at least one character in its (setText). How to speed up the code for everyone to be displayed at once and be shown without put character ?
cell = new Cell[lin][col];
for (int l = 0; l < lin; l++) {
for (int c = 0; c < col; c++) {
cell[l][c] = new Cell();
cell[l][c].setBounds(iniLeftTop.getX(), iniLeftTop.getY(), sideCell, sideCell);
cell[l][c].setText("A"); // without this line JTextField is not shown
container.add(celula[l][c]);
iniLeftTop.x = iniLeftTop.x + sideCell + 1;
}
iniLeftTop.x = iniLeft;
iniLeftTop.y = iniLeftTop.y + sideCell + 1;
}
Thanks a lot for any help.