need to add shape to array
I am currently making a game using a 2D array, the game only has little blocks moving around on the screen and my idea was to make a 2D array from these blocks! BUT the api really confuses me with making shapes and looking at the rectangle sections I thought this was the best option but no when I try to make a 2D array from it nothing works (the array works fine, ive tried it with JLabels) what is the best way to make a square shape? this code looks way too basic and I can't figure out what else I need to do
public Shape(int x,int y,int width,int height)
{
x = 1;
y = 1;
width = 1;
height = 1;// 1 is used as an example!
}
[930 byte] By [
melkiora] at [2007-10-2 18:19:40]

I really have no idea what you are asking, but I saw this line from your last posting:
> This game will eventualy have blocks moving across the screen....
Well maybe reply 3 or 9 of this posting will give you some ideas:
http://forum.java.sun.com/thread.jspa?threadID=729826&tstart=0
From examples of 2D arrays that ive seen people make them out of JLabels mostly and I thought about making a class that makes a square(rectangle) and make the array out of the rectangle. But that method I found on the api doesn't seem to work when it comes to making an array.
Is that a good way to do it? or should I just stick to JLabels? as I can get those to work(apart form setting their size, I need to look into that).
I also need to make one of the squares/lables (call it what you will) a certain colour and so when the user presses a button(keylistener) the "player" moves up or down. And I need to have other squares move across the screen (right to left) in another color.