public void updateTransitionView() { int x, y, h; String s = ""; for (x = 0; x < rows; x++) { for (y = 0; y < cols; y++) { for (h = 0; h < head; h++) { s = "" + loc.getTProb(tXCount, tYCount, tHCount, x, y, h); states[x][y][h].setText(s); states[x][y][h].setBackground(Color.white); } states[x][y][4].setBackground(Color.white); states[y][y][4].setText(""); } } states[tXCount][tYCount][tHCount].setBackground(Color.cyan); // states[tX][tY][4].setText( Integer.toString( tH)); if (++tHCount == head) { tHCount = 0; if (++tYCount == cols) { tYCount = 0; if (++tXCount == rows) { tXCount = 0; } } } }