public PongView(PongModel model) {
        //initialize the View members:
        this.model = model;

        WIDTH_PXL = 600;
        HEIGHT_PXL = WIDTH_PXL*((int)model.getFieldSize().getHeight())/((int)model.getFieldSize().getWidth());

        this.ball = new Ball();

        this.bars = Collections.unmodifiableMap(new HashMap<BarKey,Bar>() {{
                    put(BarKey.LEFT, new Bar(0));
                    put(BarKey.RIGHT, new Bar(WIDTH_PXL));
                }});
        final Map<BarKey,JLabel> scorelabels = new HashMap<BarKey,JLabel>();

        // initialize the graphics stuff:
        final JFrame frame = new JFrame("SwingPong");
        final JLabel msglabel = new JLabel("Messages");
        try {
        SwingUtilities.invokeAndWait(new Runnable() {
                public void run() {
                    final int MSG_HEIGHT = 30;
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    
                    frame.setLayout(null);
                    JLabel background = new JLabel("");
                    background.setBackground(Color.BLACK);
                    background.setOpaque(true);
                    background.setBorder(BorderFactory.createLineBorder(Color.WHITE));
                    background.setBounds(0,0,WIDTH_PXL,HEIGHT_PXL);

                    JLabel centerline = new JLabel("");
                    final int CENTERLINE_WIDTH = 5;
                    centerline.setBackground(Color.WHITE);
                    centerline.setOpaque(true);
                    centerline.setBounds(WIDTH_PXL/2-CENTERLINE_WIDTH/2,0,
                                         CENTERLINE_WIDTH, HEIGHT_PXL);

                    msglabel.setPreferredSize(new Dimension(WIDTH_PXL, MSG_HEIGHT));
                    msglabel.setBounds(1,10, WIDTH_PXL-20, MSG_HEIGHT);
                    msglabel.setForeground(Color.WHITE);
                    msglabel.setBackground(Color.BLACK);
                    msglabel.setOpaque(true);
                    msglabel.setHorizontalAlignment(SwingConstants.CENTER);

                    for (BarKey k : BarKey.values()) {
                        scorelabels.put(k, makeScoreLabel(k));
                    }

                    frame.getContentPane().setPreferredSize(new Dimension(WIDTH_PXL, HEIGHT_PXL));
                    
                    for (Bar bar : bars.values()) {
                        frame.getContentPane().add(bar.getJComponent());
                    }
                    frame.getContentPane().add(ball.getJComponent());
                    for (JLabel scorelabel : scorelabels.values()) {
                        frame.getContentPane().add(scorelabel);
                    }
                    frame.getContentPane().add(msglabel);
                    frame.getContentPane().add(centerline);
                    frame.getContentPane().add(background);
                    
                    frame.pack();
                }
            });
        } catch (Exception e) {
            System.err.println("Couldn't initialize PongView: " + e);
            System.exit(1);
        }
        this.frame = frame;
        this.msglabel = msglabel;
        this.scorelabels = scorelabels;
    }