Code from Sun exemples and tutorials