I am creating a GUI program in which there are several menus. By clicking the menu item, a new frame is opened and perform some task and then close it but not the main frame. For this reason, I created a separate class form.java. In this class, I created ten functions, in which each fn contain one frame. I created the object of this class in the constructor of my main class in which my main frame. I call that function when one menu item is clicked.
Question: Are all the functions using memory when only object is created of form.java class in my main class before calling that function? This function is called when the menu item is clicked. I suppose at that time it takes memory space and not before calling...