Display a ResultSet in JTable with high memory consumption

240 views Asked by At

I'm currently writing a Trace-Monitor that receives messages from a device for debugging purposes. It looks pretty much like WireShark.

Traces are stored in a database and a JTable displays the ResultSet. The problem is: As long as the Trace-Monitor is connected to the device the memory consumption goes up with every incoming trace message. I think this is because of the JTable holding references.

How can I tell the JTable to only keep the data in memory which the user actually sees in the scrolling area?

Thanks for any help

1

There are 1 answers

0
ravibagul91 On

Do this may be of your use

model.setRowCount(0);