@Override
	public void paintComponent(Graphics g) {
        super.paintComponent(g);
        
        g.setColor(Color.MAGENTA);
        g.fillRect(0, 0, tileSize * tileLineWidth, this.getHeight());
        
    //    System.out.println(imgs.size());
    //    
        for(int i = 0; i < imgs.length; i++){
        	ImageIcon img = imgs[i];
        	
        	int tempHeight = 0;
        	int tempWidth = i;
        	
        	while(tempWidth >= tileLineWidth){
        		tempWidth -= tileLineWidth;
        		tempHeight++;
        	}
        	
        	if(img != null){     
        		img.paintIcon(this, g, tempWidth * tileSize, tempHeight * tileSize);
        		if(infoMode){
        			g.setColor(Color.WHITE);
        			g.drawString("t: " + tileInfo[i], tempWidth * tileSize, tempHeight * tileSize + 10);
        		}
        	}
        }
        
        if(mouseTileX <= 9) cursor[tileSizeToCursor[tileSize]].paintIcon(this, g, mouseTileX * tileSize,  mouseTileY * tileSize);
      //  g.setColor(Color.BLACK);
      //  g.drawString("choice: " + tileChoice, 10, 200);
    }