public void paint(Graphics g) {

        super.paint(g);

        Graphics2D g2d = (Graphics2D) g;
        if (inGame) {
            for (Alien a : aliens) {
                if (a.isVisible())
                    g2d.drawImage(a.getImage(), a.getX(), a.getY(), this);

            }

            ArrayList<Missile> ms = craft.getMissiles();

            for (Missile m : ms) {
                if (m.isVisible())
                    g2d.drawImage(m.getImage(), m.getX(), m.getY(), this);
            }

            if (craft.isVisible()) {
                g2d.drawImage(craft.getImage(), craft.getX(), craft.getY(), this);
            }

            g2d.setColor(Color.WHITE);
            g2d.drawString("Aliens left: " + aliens.size(), 5, 15);
        } else {
            String msg = "Game Over you lose";
            Font small = new Font("Helvetica", Font.BOLD, 20);
            FontMetrics metr = this.getFontMetrics(small);

            g.setColor(Color.RED);
            g.setFont(small);
            g.drawString(msg, (B_WIDTH - metr.stringWidth(msg)) / 2,
                    B_HEIGHT / 2);



        }


        Toolkit.getDefaultToolkit().sync();
        g.dispose();
    }