Source code for UIDemo