Hi:

In Java 6, drawImage method is defined in the java.awt package in the
class Graphics as the following:

public abstract boolean drawImage(
  Image img, int x, int y, ImageObserver observer)
* * * * * * * * * *

I write the following code:
//Code start
public void paintComponent (Graphics g){
Image image = new ImageIcon("picturefile.jpg").getImage();
g.drawImage(image, 3, 4,this);}
//Code end
* * * * * * * * * *
The abstract method is supposed to be implemented by some class  which
implements the interfact.

The questions are:
1) The Graphics class is an abstract class, so which class implements
Graphics?
2) Where is the method defined inside the class which implements the
interface?

Alex

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en

Reply via email to