tableModel.remove(keys[i]);
if(keys[i]!=null) { tableModel.remove(keys[i]); }
    public void actionPerformed(ActionEvent event) {        Object source = event.getSource();        if (source == bOk) {            // Copy over the new set of properties from the properties table            // model.            properties.clear();            Properties newProps = tableModel.getProperties();            Enumeration keys = newProps.keys();            while (keys.hasMoreElements()) {                String key = (String)keys.nextElement();                 properties.put(key, newProps.getProperty(key));            }            dispose();        } else if (source == bCancel) {            dispose();        } else if (source == bDel) {            int total = tProperties.getSelectedRowCount();            Object [] keys = new Object[total];            int [] selRows = tProperties.getSelectedRows();                        for(int i=0;i<total;i++) {                keys[i] = tProperties.getValueAt(selRows[i],0);            }                        for(int i=0;i<total;i++) {                tableModel.remove(keys[i]);            }                    }    }