To compile your example the line import dwt.graphics.Rectangle; was missing. The array bounds exception was a bug in DWT. It is fixed in http://www.dsource.org/projects/dwt-win/changeset/302%3A555d58850cd9 Thanks for your interest in DWT and reporting this problem. Frank