well u can cut the part of adding into the multidimensional array by doing this
but i don't know how u access ur database, my way is through the
JDBC-ODBC
Ps = Con.prepareStatement(SSQL);
Rs = Ps.executeQuery();
while(Rs.next()) {
dataModel.addRow(new Object[]{(Rs.getString("name")),
(Rs.getString("studentID")),
(Rs.getString("courseID"))});
}
ofcourse it must also include some try catch line, so i explain abit here... prepare the SQL statement then execute it... so while loop will go through the database record till no more found
datamodel is for the JTable new object will declare new record being append to the end so name, studentID, courseID are my database field name it will get the record from there and will fill up ur JTable bcz of the while loop
the code above is incomplete, i didn't include my declaration of my JDBC and variable declaration so if u know how to do then i think u know where to put it, else ill give u the complete 1 when u ask for...