I am trying to insert the results of an array into a new object array, but how it works. >
I make 10 * 10 and Hello to make all the elements in the chess array to go through all elements to make a 10-10 matrix for the first time.
What is my array, in my case the "Hello" output is called the result 1
Now I assign all elements of result 1 to the row data in an object order [] [] I want to insert Its array will go to a JTB
JTable table = new JTable (row data, column name); String [] [] chess = new string [10] [10]; {For (int line = 0; row & lt; = 9; line ++) {for (col col; 0; col & lt; = 9; col ++) {chess [row] [col] = "hello "; }} String result 1 = ""; (For int col2 = 0; col2 and lt; = 9; col2 ++) {result1 + = chessboard [row1] for {int line 1 = 0; line1 and lt; = 9; line 1++} ] [Col2]; } Result1 + = "\ r \ n"; } System.out.format (Results 1); Object row data [] [] = {result in each element of new object array 1};
You can simply pass the string
array because it There is no need for a new object [] []
:
JTable table = new JTable (chess, column name);
An array of strings is also an array of object
s for sympathy in Java arrays.
No comments:
Post a Comment