int p = 0;
int z = 0;
while (p < plaintext.length) {
while (z < 26) {
buttons[plaintext[p]+z*26].setBackground(Color.GREEN);
z++;
}
z = 0;
p++;
}
I am setting a column of 26 buttons to have a green background with as starting point the variable P in a 26 by 26 grid of buttons. So my question is how can I have a delay between each column changing background color so that it first shows the first column turning green and waits a few seconds and then shows the second column turning green and waits a few seconds and so on.
thank you in advance