Table Column and Table Model.
1 posts in topic
Flat View  Flat View

Posted By:   Effi_Olivkovich
Posted On:   Sunday, July 14, 2002 12:09 AM

I have created a custom table model that extends DefaultTableModel.

When I add columns to my JTable, every thing is OK. I create each column and add it to the table using the addColumn command. The problem happens when I try to add rows of data to the table. It seems as if the columns I add are not registered with the table model, so when I use- model.addRow, I get NullPointer Exception. How can I solve this problem.


Re: Table Column and Table Model.

Posted By:   Axel_Richter  
Posted On:   Monday, July 15, 2002 02:34 AM

Why do you extend DefaultTableModel and what do you extend there? Try to extend AbstractTableModel as described in:

About | Sitemap | Contact