https://kodejava.org/how-do-i-check-if-cursor-is-in-the-last-row/
How do I check if a cursor is in the last row?