I have a jtable and it is returning a NullPointerException
.
My code looks like this:
for( int i=0 ;i<rows;++i){
if(Stats.getValueAt(i,2)!=null){
observed[i]=Double.parseDouble(Stats.getValueAt(i,2));
}
if(Stats.getValueAt(i,2).equals(" "))
break;
}
It still returns NullPointerException
if not filled up.
How can I stop this?