Some changes.

loadFile() is not a private method. Load state added. Import statements
reordered.
Some changes.

loadFile() changed to a private method to be invoked inside the
constructor. A boolean load state is added. Reordered import statement.
Some changes.

Program now stops if the cancel or exit button is clicked. loadFile() is
no longer a public method.