Added function to get JTextField values so the code would be more
modular.