Question

I have developed a Java Swing application which consists of JTable. The JTable displays data of text file. The textfile is comma separated. After displaying i am summing up the totals and displaying them in another JTable which can be vertically scrolled. But when the rows in the table are more, then the JTable is not stable when vertically scrolled. The data gets repeated or the file gets corrupted.

enter image description here

enter image description here

Was it helpful?

Solution

there is maybe (no code, no hash) some issues with

1) Concurency in Swing,

2) why JTable loads data on Runtime or there un-know concurency between JTables and one TableModel

3) add your data to the DefaultTableModel

4) better would be implements DefaultTableModel for each of JTable separately

more tutorial and examples

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top