public void paintComponent(Graphics g) {
        super.paintComponent(g);
        
        g.setColor(Color.magenta);
        
        int tileSize = parent.tilePanel.getTileSize();
        
        //fill rect by tilemap width (tileID[0]) and tilemap height (tileID[0][0])
		g.fillRect(0, 0, tileID[0].length * tileSize, tileID[0][0].length * tileSize);
		
		if(tiles.size() > 0){
			for(int k = 0; k < tileID.length; k++){
				for(int x = 0; x < tileID[0].length; x++){
					for(int y = 0; y < tileID[0][0].length; y++){
						try{
							tiles.get(tileID[k][x][y]).paintIcon(this, g, x * tileSize, y * tileSize);
						}
						
						catch(ArrayIndexOutOfBoundsException e){
							tiles.get(tileID[k][0][0]).paintIcon(this, g, x * tileSize, y * tileSize);
						}
					}
				}
			}
		}
		
		g.setColor(Color.red);
        
		if(parent.xmlList != null){
			System.out.println("not null");
			int panelNum = 0;
	        for(int i = 0; i < parent.xmlList.xmlPanels.size(); i++){
	        	System.out.println("panels side > 0");
	        	XMLPanel p = parent.xmlList.xmlPanels.get(i);
	        	if(p.myColor != null) g.setColor(p.myColor);
	        	for(XMLObj o :  parent.xmlObjs.get(p.myNum)){
	        		System.out.println("drawing");
	        		g.fillRect(o.vars.get(0) * tileSize, o.vars.get(1) * tileSize,  tileSize, tileSize);
	        		g.drawString("type: " + p.myNum, o.vars.get(0) * tileSize, o.vars.get(1) * tileSize);
	        	}
	        	panelNum++;
	        }
		}
		
		parent.error(tileID.length + " | " + tileID[0].length + " | " + tileID[0][0].length);
	}