English 中文(简体)
• 如何在 j瓦的wing中增加row的数值?
原标题:how to add row values to jtable in java swing?

我有一个jcombo 盒子,有一些物品,如 校书”、“collegebooks”、“historybooks”,而且有活力。 对应书籍。 当点击“学校课本”或“历史课本”等 com子项目时,它应展示从阵列清单中可查的内容。 无论采取什么行动,JTable必须显示相应的教科书或历史课本的内容......it >,在每项行动都执行时,不应指新行。 但是,如果使用缺省表模型+3或4行,则指在座前行。 如果拥有7个区块,则它不去掉以前所有的区块。

问题回答

http://download.oracle.com/javase/tutorial/uiswing/components/table.html” rel=“nofollow”。 • 如何使用表格,作为编写DefaultTableModel,你需要说明你如何构建<代码>Object[]/code>通过至addRow(,以及你如何计算该指数为removeRow()。

如果在休息中使用去除(i) ,则只去除1行或2行...... 如果拥有7个牢房,则不去掉以前所有的浏览器。

当你搬走多行时,你需要将行刑从表末移至0:

for (int i = table.getRowCount() - 1; i > 0; i--)
{
    // add logic here
} 




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...