public Spawner(InitialJFrame application)
	{
		super("Spawner");
		this.application = application;
		patient = new SimulatedPatient();
		patient.activate();
		
		PatientFrame patientFrame = new PatientFrame(patient);
		patientFrame.activate();
		
		title = new JLabel("          Spawner");
		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(10, 1));
		
		add(title);
		
		pulseOximeters = new ArrayList<JFrame>();
		infusionPumps = new ArrayList<JFrame>();
		electrocardiograms = new ArrayList<JFrame>();
		
		SimulatedPulseOx pulseOximeter1 = new SimulatedPulseOx(patient, this, application);
		pulseOximeters.add(pulseOximeter1);
		
		SimulatedECG2 electrocardiogram1 = new SimulatedECG2(patient, this, application);
		electrocardiograms.add(electrocardiogram1);
		
		SimulatedIVPump2 infusionPump1 = new SimulatedIVPump2(this, application);
		infusionPumps.add(infusionPump1);
		
		pulseOximeterButtons = new ArrayList<JButton>();
		infusionPumpButtons = new ArrayList<JButton>();
		electrocardiogramButtons = new ArrayList<JButton>();
		
		pulseOximeterIsSpawned = false;
		electrocardiogramIsSpawned = false;
		infusionPumpIsSpawned = false ;
		
		setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
		WindowAdapter exitListener = new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
            	
                int confirm = JOptionPane.showOptionDialog(null, "Closing the" +
                		" spawner application will result in shutting down the system.  \nContinue?", "Exit Confirmation", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, null, null);
                if (confirm == 0) {
                    dispose();
                    System.exit(0);
                }
            }
        };
        addWindowListener(exitListener);
	}