java - JTable: display correctly refresh of a table -
i trying display information on table , refresh table. doing follows:
//rowdata , columnname computed piece of code working table = new jtable(rowdata, columnname); table.setautoresizemode(jtable.auto_resize_off); table.gettableheader().setreorderingallowed(false); getcontentpane().add(new jscrollpane(table), borderlayout.center); repaint();
however, following display (below). remove grey sqaure correspond table before update new content in red.
could please provide me advice remove ?
thank attention.
don't add new table. instead update data in data model old table.
see this: https://docs.oracle.com/javase/tutorial/uiswing/components/table.html#data
Comments
Post a Comment