> ...Instead, the cell reverts back to its original text.
after you click into another cell?
when the program re-opens?
some other time?
most here won't read more than 30 lines of code.
any more and the code must be compilable/runnable
so the problem can be seen on the screen (as most
descriptions of the problem/location are inaccurate).
if the compilable/runnable code is excessive, create
another .java file and strip everything unrelated to
the specific problem so the code is lean, then post that code.