Have you managed to pass null to anything? This two-year old thread resurfaced yesterday; I wrote about how I look for NullPointerExceptions, which are a frequent problem, so you need to know about them.
The error message says an object reference (pointer) at source line 40 in SimpleLayout is null. Look at that line of code and see what pointer could be null. I bet its button1.
In the go method you've "hidden" the definition of button1 with a local one and have NOT initialized the global one referenced where the NPE occurs. [ August 28, 2008: Message edited by: Norm Radder ]