Hey folks (I just joined here)
I'm on my first week with
java and although I have several successful years experience with php/ActionScript 3 I am finding it really difficult to get things done in java. Naturally I've been going through the oracle tuts and anything else I can find (most seem to be just regurgitated oracle tuts) but I find all of them way harder to understand than all the fantastic php and flash/as3 tuts that I learned from many years ago.
Anywho below is some image code straight from oracles tuts.
what I don't understand:
Q1. Nothing is calling the method paint, why is it running? (i think its an inherritance thing but still, I don't get it)
Q2. What if I want to display/line up many images? Is this sample class just for loading/displaying one image and as such i would write another class that keeps calling this class and passes in the image path each time?
Q3. Why can't I find a method called "paint" (lowercase) in the Java6 api?
Q4. In the sample code what is "g" in the paint method? Some kind of object i presume... ??
Q5. Because of the ease of working with images in as3 that I'm used to, I'm tempted to ask... why can't i just do something like: f.add(img); inside the LoadImageApp() method
Q5. Why is netbeans telling me to add an @override annotation with the paint method? after reading about overrides for an hour this is what has lead me to believe that the method:paint is overriding an actual java class... I still don't get it that's just what i gathered from reading. ???
thanks for tolerating my ignorance!
>>>sample image code
Thank you