java - Updating JTable after inline edit -
i have 2 classes, 1 make frame , other handle , implement interface tablemodel. when editing cells inline , updating values in class implements tablemodel need refresh table show updated data (as table needs auto sort when inline edit cell rows may need re-ordered). problem i'm having after updating data can't figure out how refresh table, i've tried hacky way of refreshing when click off cell or press enter feel there more elegant solution, ideas?
the tablemodel responsible invoking firetablecellchanged(...) method when data changed in model. sorting happen automatically.
read jtable api , follow link swing tutorial on how use tables more information tablemodels , sorting.
i suggest use defaulttablemodel don't have worry since implements tablemodel methods.
Comments
Post a Comment