English 中文(简体)
JTable rowCount problem
原标题:JTable rowCount problem

I generated a Swing interface with NetBeans. Everything works well, until I change rowCount to 4096. Now I get the exception NoClassDefFoundError. I ve tested that from rowCount 3850 it breaks. Is this is a bug, or something else; all tips are welcome. How can I increase that rowCount correctly?

最佳回答

通常使用JTable,显示一定数量的物体。 这一编号应当通过getRowCount()予以退还。 你不使用任何任意的分类,而是数据收集的大小。

查阅getValueAt(int row, int col)。 也许它试图接触不存在的物体。 如果你制作一个复制表,例如,你用SerValueAt送回的惯性来界定你的表体大小,那么你只能操纵JTable的大小。 只有在这种情况下,你才可以自由修改你所希望的回报。

public Object getValueAt(int rowIndex, int columnIndex) {
    return (rowIndex +1 ) * (columnIndex + 1);
}

If you have a ResultSet, a Vector, an ArrayList etc, get and return its size in getRowCount.

问题回答

暂无回答




相关问题
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 ...

热门标签