/*
 * Copyright 2006 Phidgets Inc.  All rights reserved.
 */


import com.phidgets.*;
import com.phidgets.event.*;

public class ManagerExample
{
	public static final void main(String args[]) throws Exception {
		Manager man;

		System.out.println(Phidget.getLibraryVersion());


		man = new Manager();
		man.addAttachListener(new AttachListener()
		{
			public void attached(AttachEvent ae) {
				System.out.println("attachment of " + ae);
			}
		});
		man.addDetachListener(new DetachListener()
		{
			public void detached(DetachEvent ae) {
				System.out.println("detachment of " + ae);
			}
		});

		man.start();
		System.out.println("Press any key to exit...");
		System.in.read();
		man.close();
		man = null;
		System.out.println(" ok");
	}
}
