public void update(Observable arg, Object arg0) {
		if (model.getPhase() == IMMOVABLEPHASE) {
			for (int i=0; i<buttons.length; i++){
				buttons[i].setEnabled(false);
			}
		} else {
			for (int i=0; i<buttons.length; i++){
				buttons[i].setEnabled(true);
			}
			this.requestFocus();
			
			for (int i = 0; i < buttons.length; i++) {
				buttons[i].setText(Integer.toString(model.getTerritory(i).getNbrOfUnits()));
				buttons[i].setBackground(model.getTerritory(i).getOwner().getColor());
				if (buttons[i].getBackground().getRed()
						+ buttons[i].getBackground().getGreen()
						+ buttons[i].getBackground().getBlue() < 250) {
					buttons[i].setForeground(Color.WHITE);
				} else {
					buttons[i].setForeground(Color.BLACK);
				}
				if (model.getTerritory(i).isProtected()) {
					float[] hsbFloats = {0f,0f,0f};
					Color.RGBtoHSB(buttons[i].getBackground().getRed(),
							buttons[i].getBackground().getGreen(),
							buttons[i].getBackground().getBlue(), hsbFloats);
					buttons[i].setBackground(Color.getHSBColor(hsbFloats[HUE],hsbFloats[SATURATION]/2,hsbFloats[BRIGHTNESS]+((1-hsbFloats[BRIGHTNESS])/2)));
					buttons[i].setBorder(BorderFactory.createSoftBevelBorder(BevelBorder.RAISED, Color.WHITE, Color.gray));
				}
			}
			if (model.getSelectedTerritoryIndex() > -1) {
				buttons[model.getSelectedTerritoryIndex()].setBackground(Color.gray);
			}			
		}
	}