Question

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?

Was it helpful?

Solution

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.

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