public void paint(Graphics g)
	{
		super.paint(g);
        // paint the background image and scale it to fill the entire space
        g.drawImage(img, 0, 0, getWidth(), getHeight(), this);
		
        
        
        if(inGame)
        {
        	Graphics2D g2d = (Graphics2D)g;
    		if(c1.isVisible())g2d.drawImage(c1.getImage(), c1.getX(), c1.getY(),this);
        	
        	ArrayList ms = c1.getMissiles();
	
	        for (int i = 0; i < ms.size(); i++ ) {
	            Missile m = (Missile) ms.get(i);
	            g2d.drawImage(m.getMis(), m.getX(), m.getY(), this);
	        }
	        
	        for(int i=0;i<aliens.size();i++){
	        	Alien a = (Alien) aliens.get(i);
	        	g2d.drawImage(a.getAlienImg(), a.getX(),a.getY(), this);
	        }
	        g2d.setColor(Color.CYAN);
	        g2d.setFont(new Font("Tristan",Font.BOLD,14));
	        g2d.drawString("Score: " + (27-aliens.size())*5, BOARD_WIDTH-100,BOARD_HEIGHT-10);
        }
        else
        {
        	String msg;
        	if(aliens.isEmpty())msg = "Mission Successfully Completed.";
        	else msg = "Game Over";
            Font small = new Font("Helvetica", Font.BOLD, 34);
            FontMetrics metr = this.getFontMetrics(small);

            g.setColor(Color.CYAN);
            g.setFont(small);
            g.drawString(msg, (BOARD_WIDTH - metr.stringWidth(msg)) / 2,
                         BOARD_HEIGHT / 2);
        }
        
        
		Toolkit.getDefaultToolkit().sync();
		g.dispose();
	}