Lock object is now final in MainForm.java.