BicepBuddyApp/src/main/java/bicepBuddyPackage/Master.java
public void loggedInMenuLoad() {
		//start the master frame with only the signup and login menu bars
		//available. When the user logs in, open up the other menu bar options.
		menuBar = new JMenuBar();
		
		this.frame.setJMenuBar(null);
		this.frame.setJMenuBar(menuBar);

		JMenu mnProfile = new JMenu("Profile");
		mnProfile.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		mnProfile.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				menuBar.add(loadingLabel);
				menuBar.revalidate();
				menuBar.repaint();
				
				new SwingWorker<Void, Void>(){

					@Override
					protected Void doInBackground() throws Exception {
						updateFrame(new ProfileView());
						return null;
					}
					
					protected void done() {
						menuBar.remove(loadingLabel);
						
						menuBar.revalidate();
						menuBar.repaint();
					}
				}.execute();
			}
		});
		menuBar.add(mnProfile);

		JMenu settings = new JMenu("Settings");
		settings.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		settings.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				menuBar.add(loadingLabel);
				menuBar.revalidate();
				menuBar.repaint();
				
				new SwingWorker<Void, Void>(){

					@Override
					protected Void doInBackground() throws Exception {
						updateFrame(new SettingsView());
						return null;
					}
					
					protected void done() {
						menuBar.remove(loadingLabel);
						
						menuBar.revalidate();
						menuBar.repaint();
					}
				}.execute();
			}
		});
		menuBar.add(settings);
		
		JMenu mnLists = new JMenu("Buddy Lists");
		mnLists.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		mnLists.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				menuBar.add(loadingLabel);
				menuBar.revalidate();
				menuBar.repaint();
				
				new SwingWorker<Void, Void>(){

					@Override
					protected Void doInBackground() throws Exception {
						updateFrame(new FriendsList());
						return null;
					}
					
					protected void done() {
						menuBar.remove(loadingLabel);
						
						menuBar.revalidate();
						menuBar.repaint();
					}
				}.execute();
			}
		});
		menuBar.add(mnLists);

		JMenu mnMatch = new JMenu("Match");
		mnMatch.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		mnMatch.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				menuBar.add(loadingLabel);
				menuBar.revalidate();
				menuBar.repaint();
				
				new SwingWorker<Void, Void>(){

					@Override
					protected Void doInBackground() throws Exception {
						MatchController.generateMatches();
						if(!UserController.getUser().getIdle().isEmpty()) {
							MatchController.generateFrame();
						}
						else {
							MatchGUI.noMatches();
						}
						return null;
					}
					
					protected void done() {
						menuBar.remove(loadingLabel);
						
						menuBar.revalidate();
						menuBar.repaint();
					}
				}.execute();
			}
		});
		menuBar.add(mnMatch);
		
		if(UserController.getUser()!=null && (UserController.getUser().getEmail().equalsIgnoreCase("chasemanseth@gmail.com")||
				UserController.getUser().getEmail().equalsIgnoreCase("bob@rein.com")||
				UserController.getUser().getEmail().equalsIgnoreCase("zacharysteudel@gmail.com"))){
			JMenu administrator = new JMenu("Administrator"); 
			administrator.setFont(new Font("Segoe UI", Font.PLAIN, 12));
			administrator.addMouseListener(new MouseAdapter() {
				@Override
				public void mouseClicked(MouseEvent arg0) {
					menuBar.add(loadingLabel);
					menuBar.revalidate();
					menuBar.repaint();
					
					new SwingWorker<Void, Void>(){
	
						@Override
						protected Void doInBackground() throws Exception {
							AdminController.generateFrame();
							return null;
						}
						
						protected void done() {
							menuBar.remove(loadingLabel);
							
							menuBar.revalidate();
							menuBar.repaint();
						}
					}.execute();
				}
			});
			menuBar.add(administrator);	
		}
		JMenu logout = new JMenu("Log Out");
		logout.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		logout.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				System.out.println("Loading logout");
				UserController.setUser(null);
				UserController.getInstance().setTimesMatchCalled(5);
				UserController.getInstance().setChangesToMatches(true);

				Master.appLogger.info(":: User logged out.");
				loggedOutMenuLoad();
			}
		});
		menuBar.add(logout);
	}
/**FACADE PATTERN: function encapsulates the loading of the logged
	/*
	 * Logged in menu load. Function instantiates the menu bar for the program
	 * after logging in, allowing the user to traverse to the correct views.
	 */
FACADE PATTERN: function encapsulates the loading of the logged

Logged in menu load. Function instantiates the menu bar for the program
after logging in, allowing the user to traverse to the correct views.
FACADE PATTERN : function encapsulates the loading of the logged Logged in menu load . Function instantiates the menu bar for the program after logging in allowing the user to traverse to the correct views .
public void loggedInMenuLoad() {
		menuBar = new JMenuBar();
		this.frame.setJMenuBar(null);
		this.frame.setJMenuBar(menuBar);
		JMenu mnProfile = new JMenu("Profile");
		mnProfile.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		mnProfile.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				menuBar.add(loadingLabel);
				menuBar.revalidate();
				menuBar.repaint();
				new SwingWorker<Void, Void>(){
					@Override
					protected Void doInBackground() throws Exception {
						updateFrame(new ProfileView());
						return null;
					}
					protected void done() {
						menuBar.remove(loadingLabel);
						menuBar.revalidate();
						menuBar.repaint();
					}
				}.execute();
			}
		});
		menuBar.add(mnProfile);
		JMenu settings = new JMenu("Settings");
		settings.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		settings.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				menuBar.add(loadingLabel);
				menuBar.revalidate();
				menuBar.repaint();
				new SwingWorker<Void, Void>(){
					@Override
					protected Void doInBackground() throws Exception {
						updateFrame(new SettingsView());
						return null;
					}
					protected void done() {
						menuBar.remove(loadingLabel);
						menuBar.revalidate();
						menuBar.repaint();
					}
				}.execute();
			}
		});
		menuBar.add(settings);
		JMenu mnLists = new JMenu("Buddy Lists");
		mnLists.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		mnLists.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				menuBar.add(loadingLabel);
				menuBar.revalidate();
				menuBar.repaint();
				new SwingWorker<Void, Void>(){
					@Override
					protected Void doInBackground() throws Exception {
						updateFrame(new FriendsList());
						return null;
					}
					protected void done() {
						menuBar.remove(loadingLabel);
						menuBar.revalidate();
						menuBar.repaint();
					}
				}.execute();
			}
		});
		menuBar.add(mnLists);
		JMenu mnMatch = new JMenu("Match");
		mnMatch.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		mnMatch.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				menuBar.add(loadingLabel);
				menuBar.revalidate();
				menuBar.repaint();
				new SwingWorker<Void, Void>(){
					@Override
					protected Void doInBackground() throws Exception {
						MatchController.generateMatches();
						if(!UserController.getUser().getIdle().isEmpty()) {
							MatchController.generateFrame();
						}
						else {
							MatchGUI.noMatches();
						}
						return null;
					}
					protected void done() {
						menuBar.remove(loadingLabel);
						menuBar.revalidate();
						menuBar.repaint();
					}
				}.execute();
			}
		});
		menuBar.add(mnMatch);
		if(UserController.getUser()!=null && (UserController.getUser().getEmail().equalsIgnoreCase("chasemanseth@gmail.com")||
				UserController.getUser().getEmail().equalsIgnoreCase("bob@rein.com")||
				UserController.getUser().getEmail().equalsIgnoreCase("zacharysteudel@gmail.com"))){
			JMenu administrator = new JMenu("Administrator"); 
			administrator.setFont(new Font("Segoe UI", Font.PLAIN, 12));
			administrator.addMouseListener(new MouseAdapter() {
				@Override
				public void mouseClicked(MouseEvent arg0) {
					menuBar.add(loadingLabel);
					menuBar.revalidate();
					menuBar.repaint();
					new SwingWorker<Void, Void>(){
						@Override
						protected Void doInBackground() throws Exception {
							AdminController.generateFrame();
							return null;
						}
						protected void done() {
							menuBar.remove(loadingLabel);
							menuBar.revalidate();
							menuBar.repaint();
						}
					}.execute();
				}
			});
			menuBar.add(administrator);	
		}
		JMenu logout = new JMenu("Log Out");
		logout.setFont(new Font("Segoe UI", Font.PLAIN, 12));
		logout.addMouseListener(new MouseAdapter() {
			@Override
			public void mouseClicked(MouseEvent arg0) {
				System.out.println("Loading logout");
				UserController.setUser(null);
				UserController.getInstance().setTimesMatchCalled(5);
				UserController.getInstance().setChangesToMatches(true);
				Master.appLogger.info(":: User logged out.");
				loggedOutMenuLoad();
			}
		});
		menuBar.add(logout);
	}
public void loggedInMenuLoad ( ) { menuBar = new JMenuBar ( ) ; this . frame . setJMenuBar ( null ) ; this . frame . setJMenuBar ( menuBar ) ; JMenu mnProfile = new JMenu ( "Profile" ) ; mnProfile . setFont ( new Font ( "Segoe UI" , Font . PLAIN , 12 ) ) ; mnProfile . addMouseListener ( new MouseAdapter ( ) { @ Override public void mouseClicked ( MouseEvent arg0 ) { menuBar . add ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; new SwingWorker < Void , Void > ( ) { @ Override protected Void doInBackground ( ) throws Exception { updateFrame ( new ProfileView ( ) ) ; return null ; } protected void done ( ) { menuBar . remove ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; } } . execute ( ) ; } } ) ; menuBar . add ( mnProfile ) ; JMenu settings = new JMenu ( "Settings" ) ; settings . setFont ( new Font ( "Segoe UI" , Font . PLAIN , 12 ) ) ; settings . addMouseListener ( new MouseAdapter ( ) { @ Override public void mouseClicked ( MouseEvent arg0 ) { menuBar . add ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; new SwingWorker < Void , Void > ( ) { @ Override protected Void doInBackground ( ) throws Exception { updateFrame ( new SettingsView ( ) ) ; return null ; } protected void done ( ) { menuBar . remove ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; } } . execute ( ) ; } } ) ; menuBar . add ( settings ) ; JMenu mnLists = new JMenu ( "Buddy Lists" ) ; mnLists . setFont ( new Font ( "Segoe UI" , Font . PLAIN , 12 ) ) ; mnLists . addMouseListener ( new MouseAdapter ( ) { @ Override public void mouseClicked ( MouseEvent arg0 ) { menuBar . add ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; new SwingWorker < Void , Void > ( ) { @ Override protected Void doInBackground ( ) throws Exception { updateFrame ( new FriendsList ( ) ) ; return null ; } protected void done ( ) { menuBar . remove ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; } } . execute ( ) ; } } ) ; menuBar . add ( mnLists ) ; JMenu mnMatch = new JMenu ( "Match" ) ; mnMatch . setFont ( new Font ( "Segoe UI" , Font . PLAIN , 12 ) ) ; mnMatch . addMouseListener ( new MouseAdapter ( ) { @ Override public void mouseClicked ( MouseEvent arg0 ) { menuBar . add ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; new SwingWorker < Void , Void > ( ) { @ Override protected Void doInBackground ( ) throws Exception { MatchController . generateMatches ( ) ; if ( ! UserController . getUser ( ) . getIdle ( ) . isEmpty ( ) ) { MatchController . generateFrame ( ) ; } else { MatchGUI . noMatches ( ) ; } return null ; } protected void done ( ) { menuBar . remove ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; } } . execute ( ) ; } } ) ; menuBar . add ( mnMatch ) ; if ( UserController . getUser ( ) != null && ( UserController . getUser ( ) . getEmail ( ) . equalsIgnoreCase ( "chasemanseth@gmail.com" ) || UserController . getUser ( ) . getEmail ( ) . equalsIgnoreCase ( "bob@rein.com" ) || UserController . getUser ( ) . getEmail ( ) . equalsIgnoreCase ( "zacharysteudel@gmail.com" ) ) ) { JMenu administrator = new JMenu ( "Administrator" ) ; administrator . setFont ( new Font ( "Segoe UI" , Font . PLAIN , 12 ) ) ; administrator . addMouseListener ( new MouseAdapter ( ) { @ Override public void mouseClicked ( MouseEvent arg0 ) { menuBar . add ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; new SwingWorker < Void , Void > ( ) { @ Override protected Void doInBackground ( ) throws Exception { AdminController . generateFrame ( ) ; return null ; } protected void done ( ) { menuBar . remove ( loadingLabel ) ; menuBar . revalidate ( ) ; menuBar . repaint ( ) ; } } . execute ( ) ; } } ) ; menuBar . add ( administrator ) ; } JMenu logout = new JMenu ( "Log Out" ) ; logout . setFont ( new Font ( "Segoe UI" , Font . PLAIN , 12 ) ) ; logout . addMouseListener ( new MouseAdapter ( ) { @ Override public void mouseClicked ( MouseEvent arg0 ) { System . out . println ( "Loading logout" ) ; UserController . setUser ( null ) ; UserController . getInstance ( ) . setTimesMatchCalled ( 5 ) ; UserController . getInstance ( ) . setChangesToMatches ( true ) ; Master . appLogger . info ( ":: User logged out." ) ; loggedOutMenuLoad ( ) ; } } ) ; menuBar . add ( logout ) ; }
FACADE PATTERN: function encapsulates the loading of the logged
FACADE PATTERN : function encapsulates the loading of the logged
//start the master frame with only the signup and login menu bars
 //available. When the user logs in, open up the other menu bar options.
