Can anyone explain to me that approach he/she took to display the data in the Table? I have code returning DataInfo objects and have a custom TableModel for data display. The question that I haven't found a sound answer to is how the data should be taken from each DataInfo object and then populated in the table?
In my TableModel I created a method called private void setDataArray(DataInfo[] records, int fieldCount) I call this method from the constructor of the table model. In this Array I create a 2 dimensional array. I loop through the DataInfo array and assign the values to the 2 dim array, and there you go. Mark
Yes that is the basic idea. You are transforming the DataInfo array into a two dimensional array that a DefaultTableModel already knows how to handle, in one three line method. Mark