public void paintComponent(Graphics g){
    	 super.paintComponent(g);
        
         // fill bottom
         g.setColor(new Color(238,238,238));
         g.fillRect(0, 550, 1000, 150);
        
         //draw state control
         g.setColor(Color.black);
         g.drawRect(350, 50, 300, 80);
         g.setFont(new Font("sans", Font.PLAIN, 30));
         g.drawString("State Control",414,103);
        
         // draw tapehead
	     int tapeHeadX = tapeHeadCell * 30;        
	     g.drawLine(tapeHeadX+16, 180, tapeHeadX+16, 460);
	     g.drawLine(tapeHeadX+16, 460, tapeHeadX+11, 455);
	     g.drawLine(tapeHeadX+16, 460, tapeHeadX+21, 455);
	     g.drawLine(500 , 180, tapeHeadX+16, 180);
	     g.drawLine(500 , 180, 500, 130);      
      
         // draw cells
         int a = 0;
         for(int i = 0; i < 33; i++){
        	 g.setColor(Color.black);
             g.drawRect(1+a, 460, 30, 30);
             a = a+30;
         }
      
         // draw symbols
	     a = 12;
	     for(int i = 0; i<input.size(); i++){
	     	g.setColor(Color.black);
	        g.setFont(new Font("arial", Font.PLAIN, 18)); 
	        String blank = (String)input.get(i);
	        if((printOrder == 0) && (i == tapeHeadCell)){}
	        else{
	        	if((blank.equals("")) || (blank.equals(("Blank Symbol")))){
	        		g.drawRect(a-3, 468, 14, 15);
			    }
			    else{
			    	g.drawString((String)input.get(i),a,481); 
			    }
	        }
	        a = a+30;
	     }
     }