public static void register(Animator animator, Object speedBar) {
		SpeedBarListener listener = new SpeedBarListener();
		listener.animator = animator;
		listener.speedBar = speedBar;
		Class speedBarClass = speedBar.getClass();
		boolean useFakeListener = false;
		Method addListener = lookForListener(speedBarClass, "addAdjustmentListener", "java.awt.event.AdjustmentListener");
		if (addListener == null) {
			addListener = lookForListener(speedBarClass, "addChangeListener", "javax.swing.event.ChangeListener");
		}
		if (addListener == null) {
			addListener = lookForListener(speedBarClass, "addChangeListener", "ChangeListener");
			useFakeListener = true;
		}
		try {
			listener.getValue = speedBarClass.getMethod("getValue", new Class[0]);
			listener.getMinimum = speedBarClass.getMethod("getMinimum", new Class[0]);
			listener.getMaximum = speedBarClass.getMethod("getMaximum", new Class[0]);
			Object[] args = { listener };
			if (useFakeListener) {
				Class fakeChangeListener = Class.forName("FakeChangeListener");
				Class[] types = { Class.forName("java.awt.event.AdjustmentListener") };
				Constructor newFakeChangeListener = fakeChangeListener.getConstructor(types);
				args[0] = newFakeChangeListener.newInstance(args);
			}
			addListener.invoke(speedBar, args);
		} catch (Exception ex) {
			throw new ErrorException("Illegal speed bar object");
		}
		listener.setSpeed();
	}