public StateDisplay (IconBar bar, String file)
	{
		super(bar, file);
		try
		{
			InputStream in = getClass().getResourceAsStream(
				Bar.Resource + file + "on" + "."
					+ Global.getParameter("icontype", "gif"));
			int pos = 0;
			int n = in.available();
			byte b[] = new byte[20000];
			while (n > 0)
			{
				int k = in.read(b, pos, n);
				if (k < 0) break;
				pos += k;
				n = in.available();
			}
			in.close();
			IOn = Toolkit.getDefaultToolkit().createImage(b, 0, pos);
			MediaTracker T = new MediaTracker(bar);
			T.addImage(IOn, 0);
			in = getClass().getResourceAsStream(
				Bar.Resource + file + "off" + "."
					+ Global.getParameter("icontype", "gif"));
			pos = 0;
			n = in.available();
			byte b1[] = new byte[20000];
			while (n > 0)
			{
				int k = in.read(b1, pos, n);
				if (k < 0) break;
				pos += k;
				n = in.available();
			}
			in.close();
			IOff = Toolkit.getDefaultToolkit().createImage(b1, 0, pos);
			T.addImage(IOff, 1);
			T.waitForAll();
			W = IOn.getWidth(this);
			H = IOn.getHeight(this);
			if (Bar.Vertical)
				X = Size / 2 - W / 2;
			else X = 0;
			Y = Size / 2 - H / 2;
		}
		catch (Exception e)
		{
			IOn = IOff = null;
		}
	}