简体   繁体   中英

Display a ResultSet in JTable with high memory consumption

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

Do this may be of your use

model.setRowCount(0);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM