java - Does the forms still in the memory as long as the application runs? -


i developing swing application concerning university management system , schedule generation (using java swing) figure below:

university management system form


user have reserve room given course
(this done selecting course in jtable , clicking reserve button

process of rooms reservation done using joptionpane loads rooms , put them matrix of jbutton on jframe , jframe cloned on joptionpane window figure below :

the red buttons means theses room reserved in time slot

according high number of rooms , number of time slot in each day, reservation window take 10 - 15 seconds load theses rooms,
then after reserving room, window closes or user can close window without reserving clicking "ok" button

but when reopen same window, takes 3-4 seconds !

, when close connection database after getting data (the rooms names) , , after closing window ! (joptionpane)

question : reason ?
if close cnx , window, why second time open window ( long application runs in same session), takes less time?

it seems window still in memory of pc or else?

any suggestions?


Comments