I got it guys! I kinda worked through it my own way. It may not be the most efficient but tell me what ya think. I ended up avoiding 2D arrays altogether and just used the gridlayout.
Thanks for...
Type: Posts; User: captain
I got it guys! I kinda worked through it my own way. It may not be the most efficient but tell me what ya think. I ended up avoiding 2D arrays altogether and just used the gridlayout.
Thanks for...
Sorry about this guys but I'm still having trouble. I just can't seem to get it to color only a certain amount of tiles. It either colors them all one color or gives me a nullpointer at
so you're basically saying something like this
public void setColor() {
for(int i = 0; i < tiles.length; i++)
if(tiles[i] == null){
setBackground(Color.YELLOW);...
Alright so basically what I'm trying to do is create a 16x16 square board of tiles (256 total) and when I run the program I need it to set up the tiles randomly into the following colors
39...