java - JTable: grabbing data? -


how can parse data table model, can readily loaded , displayed jtable ?

for example, loaded jtable, drag , drop columns change orders. how of table information ? there standard store data in can read next jtable ?

dragging of columns supported automatically. however, not change order of data in tablemodel , should not so.

if want access data in model in order in model created use:

table.getmodel().getvalueat(...); 

if want access data in current view of table use:

table.getvalueat(...); 

if reason need convert indexes between view/model can use 1 of convertxxx(...) methods found in jtable api.

additionally, how can parse data table model, can readily loaded , displayed jtable ?

this doesn't make sense. if data in tablemodel there no need parse it. if talking saving data file, many people use simple format like:

data1|data2|data3

then when read data in line line can use string.split(...) method each individual method. can use defaulttablemodel.addrow(...) method add each row model.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -