import javax.swing.*; import java.awt.*; import java.beans.*; //import AWTBPEvents.*; import NonAWTBPEvents.*; /** * This class implements a short program to monitor blood pressure * * @author Stuart Hansen * @version February 2009 */ public class BloodPressureFrame extends JFrame { // The constructor creats a window to hold the monitoring panel // then add the panel to it public BloodPressureFrame (Patient pat) { super(); Container c = getContentPane(); BloodPressurePanel bpp = new BloodPressurePanel(); c.add(bpp); pat.addBloodPressureListener(bpp); bpp.setSystolicDisplay(pat.getSystolic()); bpp.setDiastolicDisplay(pat.getDiastolic()); setTitle("Blood Pressure Monitor for " + pat.getName()); setSize(350, 200); setLocation(100, 350); setVisible(true); } }