Added the functionalities to the JFrame used