Dmitry Zhlobo
Dmitry Zhlobo

Reputation: 379

How often JTable call getValueAt()?

How often my JTable call getValueAt() from AbstractTableModel?

Is it will be normal, if I will make big calculations in getValueAt() (for example, calculate value of polynomial)? Should I store values of polynomial in array and return from it?

Upvotes: 2

Views: 1257

Answers (1)

Nate W.
Nate W.

Reputation: 9249

It is called often; in fact you can see how often by putting in a print statement and watch it fill up your console window. I recommend caching your polynomials if they're expensive to compute, though this is true for all computations everywhere, not just for polynomials in a JTable.

Upvotes: 4

Related Questions