Tag: abstracttablemodel

JTable没有显示

在我的应用程序中,一切都分布 在一个动作中,应用程序从DB中检索数据并保存在ArrayList<T> 。 我创build一个RelativeTableModel的对象,我传递ArrayList<T> 。 public void RelationsClicked() { ArrayList<Relation> data = myParent.dbOperation.getRelations(); RelativeTableModel tModel = new RelativeTableModel(data); // subclass of AbstractTableModel myParent.SetBrowsePanelData(tModel); myParent.SetMainPanel(CashAccountingView.BROWSEPANEL); } 我有JScrollPane中有一个JTable的BrowseListPanel类。 它的实例已经在主应用程序中创build。 我将模型传递给BrowseListPanel并最终显示面板。 码: public void SetBrowsePanelData(AbstractTableModel tModel) { browsePanel.setTModel(tModel); } // BrowseListPanel's Code public void setTModel(AbstractTableModel tModel) { this.tModel = tModel; // tModel = AbstractTableModel } // Show the […]