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.

y enter image description here

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

Popular posts from this blog

yii2 - Yii 2 Running a Cron in the basic template -

asp.net - 'System.Web.HttpContext' does not contain a definition for 'GetOwinContext' Mystery -

mercurial graft feature, can it copy? -