java - Unexpected return value when removing a row -
i having trouble removal of blank lines in jtable. when compile it, unexpected return value error. grateful if fix problem. thanks
public void removerow(int row, int column) { for(int i=0;i<nextposition;i++) { if(athtable.getmodel().getvalueat(i,0).equals("")) { return row == i; } } } 
you returning boolean:
return row == i; when have declared function returning void.
public void removerow(int row, int column) this leading compilation error. replace return boolean , add return false; @ end make sure function returns something.
Comments
Post a Comment