Changed text to be displayed in a JTextField instead of JLabel. Also removed redundant code