public SimulatedPulseOx(SimulatedPatient patient, Spawner spawn, InitialJFrame app)
	{
		super("Simulated PulseOx");
		this.patient = patient;
		application = app;
		spawner = spawn;
		
		title = new JLabel("   Simulated PulseOx");
		title.setFont(new Font("Arial", Font.PLAIN, 38));
		title.setForeground(Color.WHITE);
		title.setBackground(Color.BLACK);
		setSize(defaultWidth, defaultHeight);
		getContentPane().setBackground(Color.BLACK);
		setLayout(new GridLayout(3, 1));
		
		Q2 = new JButton("Q2 - NOT ASSOCIATED (Press to Associate over Q2)");
		Q2.addActionListener(this);
		associatedQ2 = false;
		Q2.setBackground(red);
		Q2.setFocusPainted(false);
		
		patientConnect = new JButton("Connect to Patient");
		patientConnect.addActionListener(this);
		patientConnect.setBackground(purple);
		patientConnect.setFocusPainted(false);
		connected = false;
		
		spawned = false;
		
		add(title);
		add(Q2);
		add(patientConnect);
		
		setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
		WindowAdapter exitListener = new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                int confirm = JOptionPane.showOptionDialog(null, "Are You Sure You Want To Close Simulated PulseOx?", "Exit Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
                if (confirm == 0) {
                   generator.interrupt();
                   spawner.pulseOximeterClosed();
                   if (application.isQ2Associated().equals(true))
                	   application.toggleQ2();
                   dispose();
                }
            }
        };
        addWindowListener(exitListener);
	}