java - I'm getting array dimension missing error -


defaulttablemodel dt = (defaulttablemodel)jtable1.getmodel();  for(int = 0 ; i<date.size();i++){    dt.addrow(new object[](firstname(i),secondname(i),gender(i))); } 

i'm getting array dimension missing error. why?

you should use { } because row composed of array of objects.

dt.addrow(new object[]{g(i),ti(i),to(i)}); 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -