swing - Between JTable and TableModel -
now confused...
jtable part of swing api it's handling how view table stated jtable table = new jtable();
however things database needs class, either it's extended abstracttablemodel or defaulttablemodel. how state ?
second :
jtable(object[][] rowdata, object[] columnnames)
jtable(vector rowdata, vector columnnames)
this sun website, how or maybe put in code ?
as far read how data handled dealt on class extends either class. mean how it's printed in view on jtable in model ?
well, if there's reading on part, please point on can read this.
thanks in advance
i don't know if understand question. asking how create tablemodel jdbc resultset? if so, there nice technique doing here:
http://technojeeves.com/joomla/index.php/free/59-resultset-to-tablemodel
this reads of data memory. if query large, , if jdbc driver supports arbitrary scrolling cursors, create implementation of tablemodel interface backed resultset itself, should prevent application running out of memory large results. little more complex, demonstrated here:
http://www.java2s.com/code/java/swing-jfc/resultsettable.htm
Comments
Post a Comment