Hi Darryl,
Thanks for your feedback. I will admit that I am still quite newish to
Java programming despite having done a Masters and then doing work-projects for almost a year. JTables have been quite a challenging area I have found and it's something I'm slowly getting better at.
The reason I chose to store the model in the variable was due to it being a subclass of the main model and that constantly down-casting after using
is meant to be quite bad for performance. It's always stored as this variable after calling
.
You say that it automatically repaints the dirty region. If that's so then why would
even need to exist? In the context of using it, I have made it so that pressing the "delete" button clears the text in a cell just as you would expect in an Excel spreadsheet. It wasn't updating before then so I needed to include it.
Yes, I was aware it's a year old. I couldn't find a similar answer elsewhere and know that people still look at old threads.