no1zson the first link which you provided was given to you because of your specific problem and sorry I would not recommend it as guideline for beginner. However if you can post working link to that book "Thinking in Java" (doesn't work right now), that will be helpful.
Other then this you can have look at Java Sun tutorials or you can buy/get from library a book from O'Reily selection, according to jwenting many of them are good, or get Java How to Program from Deitel. These will get you going for start...
This is another site that is extremely helpful for tiny code fragments to get you started when you are coding something from part of the API that you haven't used before: http://www.exampledepot.com/index.html
(keep in mind that it's java 1.4 code, so newer things are probably not in there)