public void setFillMode(FillMode fm) {
		fillMode = fm;
		if (fillMode == FillMode.getNoFillMode()) {
			setBackground(Color.black);
			setBackgroundImage(null);
		}
		else if (fillMode instanceof FillMode.ColorFill) {
			setBackground(((FillMode.ColorFill) fillMode).getColor());
			setBackgroundImage(null);
		}
		else if (fillMode instanceof FillMode.ImageFill) {
			setBackground(new Color(0x00000000, true));
			String s = ((FillMode.ImageFill) fillMode).getURL();
			if (FileUtilities.isRelative(s)) {
				if (resourceAddress == null) {
					setFillMode(FillMode.getNoFillMode());
				}
				s = FileUtilities.getCodeBase(resourceAddress) + s;
			}
			if (!MolecularContainer.isApplet()) {
				URL remoteCopy = ConnectionManager.sharedInstance().getRemoteLocation(s);
				if (remoteCopy != null)
					s = remoteCopy.toString();
			}
			if (MolecularContainer.isApplet() || FileUtilities.isRemote(s)) {
				URL url = null;
				try {
					url = new URL(s);
				}
				catch (MalformedURLException e) {
					setBackgroundImage(null);
					repaint();
					return;
				}
				ImageIcon icon = ConnectionManager.sharedInstance().loadImage(url);
				if (icon != null && icon.getIconWidth() > 0 && icon.getIconHeight() > 0) {
					setBackgroundImage(icon);
				}
				else {
					setBackgroundImage(null);
				}
			}
			else {
				setBackgroundImage(new ImageIcon(Toolkit.getDefaultToolkit().createImage(s), s));
			}
		}
		else {
			setBackground(new Color(0x00000000, true));
			setBackgroundImage(null);
		}
		repaint();
	}