Added function to exiting via JFrame frame and JButton quit.