java - Saving the "View" of a JTable -


imagine application data displayed in jtable. application developer have set default layout jtable, user might not happy with. if user edit table view, swaping columns, resizing others, etc, there function view parameters hidden in doc, can them , save them reuse?

no. there no easy way. can , set column widths get/setwidth methods on tablecolumn object. , can manipulate order using code :

int columnindex = jtable.convertcolumnindextoview(jtable.getcolumn("colname").getmodelindex());     jtable.getcolumnmodel().movecolumn(columnindex, e.getvalue()); 

unfortunately there no easy way this. have width , order, save it, , reset @ later point (usually when open application again).


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -