I wish to reset my variable i back to 100 after the first loop has completed its run.
Currently once i enter the second loop my i variable begins at 600, but i want to reset this back to 100. Help would be much appreciated.
I cant just state i = 100 again as i has already been declared.
int i = 100;
int j = 50;
for (int index1 = 0; index1 < 4; index1++){
for (int index = 0; index < 10; index++){
vol1HH.add(new JTextField());
vol1HH.get(index).setBounds(i, 50, 80, h);
window.add(vol1HH.get(index));
i = i + 50;
}
// this is where I want to reset my i variable back to 100
vol1HH.add(new JTextField());
vol1HH.get(index1).setBounds(i, j, 80, h);
window.add(vol1HH.get(index1));
j = j + 50;
}