![]() |
Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
While we are overriding the paint(Graphics g) method for creating an Applet, we generally pass object of Graphics class as the argument. But Graphics is an Abstract class, still we can call the methods defined in Graphics class through the object reference of Graphics. drawString method is defined in the Graphics class as follows:- public abstract void drawString(String s, int i, int j); But we can access the above method like the following way within paint method g.drawString(String,int,int); How this is possible?
Replies:
|
Sponsored Links
|