Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 向 JTable 添加行
我正在创建一个 jTable。最初它没有行。如果我们单击“添加”按钮,将插入一个新行。是否可以在 jTable 中执行此操作?
更新您的底层证券TableModel并触发适当的事件。或者,如果您使用 的扩展名DefaultTableModel,请使用该addRow方法。
TableModel
DefaultTableModel
addRow
有关更多信息,请参阅表格教程。