Gratelful if you can help me on this. I create a tablemodel class that extends the abstractTableModel for implementing the JTable. When I run the FBN program, the JTable will initially display only the header, but not any row. It is not until the user provides a critera and displays the result in rows.
Inside my TableModel, I have the appended method for setting the value at a cell given a row and a column. Also, the rowData is set to initialized to nothing.
Now the problem comes up. My program bombs at the if statement inside the setValeAt method when displaying the query result. Of course, it bombs because the rowData is set to nothing initally unless I set it to "" i.e.
String[][] rowData = {{"", "", ""}, {"","".... to make the JTable display empty rows. However, I cannot have the JTable displaying 10000 of empty rows if the query result contains 10000 records. I know I have missed something. How can I tackle this?