Rob is right. And this whole
thread is really confused and I can't understand what is going on.
Please make sure to maintain indentation and put
code tags round the code. Please
avoid writing U'r for You're; a lot of people find that difficult to understand.
Mohammed Sanaullah is quite right; what people call a 2D array is in fact an array of arrays. In the case of a table it is in fact an array of rows; each row contains a certain number of items, so you want the length of each smaller array to be the same, what is called a rectangular array. A bit like this
row0:0 1 2 3
row1:0 1 2 3
row2:0 1 2 3
Not like this
row0:0
row1:0 1 2 3
row2:0 1 2 3
row3:0 1 2
which is called a jagged array.
You are trying to get a table which looks like this
To get that, you are trying to get an Object[][] into it. Now you want to see how you get an Object[][] which can be printed out like this
That is in fact the same as I posted before, with bits deleted. Now try creating an Object[][] which prints out like that, and print it with for loops, preferably nested and using the length attribute. Forget about the +------------+ bits, just print out the number and name in rows.
Once you have got that working, you know you have an array which you can pass to the JTable.