Maximum recursion depth exceeded (Java StackOverflowError)

So the real problem we are trying to solve is that when an edit is made, and a different cell is clicked on without first pressing the enter key, the cell edit is lost.

I found another thread in the forum about this problem, and this solution seems viable: