Search code examples
jtablejcombobox

getting null pointer exception when clicking other jtable cell


I used a customized JComboBox as a cell editor for my Jtable. My problem is when I choose nothing from the combo box and click other cell, I get a null pointer exception. But when I select something from the combobox and click other cell, I do not get an error.


Solution

  • solved it. i was creating objects using default constructor which gives me an object with its properties set to null. thus the error on jtable update.