Working through the examples on Netbeans Programming 4 Beginners