Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

TableView, Add Row dynamically and Memory

869629Jun 17 2011 — edited Aug 1 2011
Hi,

I faced an issue about adding rows dynamically to a TableView.
My TableView adds rows dynamically (About 1000) ...and the way I do this is:
private final ObservableList<PricingDatum> rows = FXCollections.observableArrayList();
Then whenever I get a new row, I just add it to the list via the add method.. (plus updates on properties)

Doing this results in more than one gig of memory.

However, if I preset the rows before, it works like a charm (25 meg of memory)

What is the best efficient way to add rows dynamically to a view?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 29 2011
Added on Jun 17 2011
15 comments
1,575 views