put it in the main function after you create a new instance of the frame class, set up all the relevant properties and necessary windows listeners/adapters, then call setVisible().