/** * This method should be called by the creator of this object after the * constructor has finished. It fills the previously created menu and tool * bars with items and action listeners that respond when those items are * activated. This needs to come after the constructor is done, because some * of the listeners try to access this object in their constructors. * * Any calls to this method after the first will do nothing. */ public void initializeMenus() { if (!menusInitialized) { menusInitialized = true; fillMenuBar(); fillToolBar(); } }