System.out.println("Now setting sector " + sectorxy[0] + "," + sectorxy[1] + " to pal " + newpal);
    public void propertyChange(PropertyChangeEvent e)    {        if (!changingSectors)        {//        	 System.out.println("Property change!");            Object source = e.getSource();            // System.out.println("source: " + e.getSource());            if (source == xField)            {                int newx = ((Number) xField.getValue()).intValue();                if ((newx >= 0) && (newx <= (width - screen_width)))                {                    x = newx;                    int[][] maparray = new int[screen_height][screen_width];                    for (int i = 0; i < screen_height; i++)                    {                        maparray[i] = mapcontrol.getTiles(i + y, x, screen_width);                    }                    gfxcontrol.setMapArray(maparray);                    gfxcontrol.setx(x);                    gfxcontrol.remoteRepaint();                    scrollh.setValue(x);                }                else                {                    xField.setValue(new Integer(x));                }            }            else if (source == yField)            {                int newy = ((Number) yField.getValue()).intValue();                if ((newy >= 0) && (newy <= (height - screen_height)))                {                    y = newy;                    int[][] maparray = new int[screen_height][screen_width];                    for (int i = 0; i < screen_height; i++)                    {                        maparray[i] = mapcontrol.getTiles(i + y, x, screen_width);                    }                    gfxcontrol.setMapArray(maparray);                    gfxcontrol.sety(y);                    gfxcontrol.remoteRepaint();                    scrollv.setValue(y);                }                else                {                    yField.setValue(new Integer(y));                }            }            else if ((source == paletteField)            		&& (gfxcontrol.knowsSector()))            {            	int newpal = ((Number) paletteField.getValue()).intValue();            	int[] sectorxy = gfxcontrol.getSectorxy();            	System.out.println("Now setting sector " + sectorxy[0] + ","            			+ sectorxy[1] + " to pal " + newpal);            	mapcontrol.setPal(sectorxy[0], sectorxy[1], newpal);            	gfxcontrol.remoteRepaint();            }        }    }