oracle - Populate Java table with resultSet -


i'm building java application gets data oracle database , puts jtable.

my problem not able populate table, don't understand how it. javadoc useless.

i don't understand why table doesn't rows:

 if ((report.getmsg()=="selecteventoall") && (report.getesito()==1))     {          defaulttablemodel dtm = new defaulttablemodel();         eventi_tb.setmodel(dtm);          try         {             resultset res_eventi = report.getres();             = 0;             object[][] datieventi = new object[report.getrowcount()][5];              while(res_eventi.next())             {                j = 0;                 while (j < 5)                {                   datieventi[i][j] = res_eventi.getobject(j+2);                   j++;                }                dtm.addrow(datieventi[i]);                i++;             }         } 

you can using custom implementation of abstracttablemodel.

after results back, put them in list , let backing list table model.

see here .. http://download.oracle.com/javase/tutorial/uiswing/components/table.html#data


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -