I am creating a Java Swing application which displays a window with a table where the user can insert or delete selected elements stored in an array. For this table I have created a table model class extending the DefaultTableModel class. The problem arises when all the elements have been deleted from the table, as a null pointer exception is thrown. Does anyone know a quick solution to this problem?
Thanks in advance!