Okay, so I think it will be easier to show you then explain. I am making Minesweeper, I have 100 toggle buttons, I have a randomizer to place 10 bombs.
ArrayList<Integer> bomb = new ArrayList<Integer>();
Random rand = new Random(100);
for (int i = 0; i < 10; i++) {
bomb.add(rand.nextInt());
(jToggleButton+bomb.get(i)).setText("B");
That doesn't work above, but do you see what I am asking? Can I somehow concatenate jToggleButton + (the random number chosen) to make like JToggleButton12 or 23 or 76, ect..
Thanks!
-Austin