Dear Pals,
What is the difference between a Graphics context and a Graphics object ?
Graphics class is an Abstract class -- then how can we have a Graphics object ?
In the paint method public void paint(Graphics g) :- what is exactly passed ...how does it expect a reference to an object of an abstract class ?
All methods of Graphics class are abstract e.g drawString(), drawRect() etc...they are not implemented in the Graphics class
Then where or in which subclass are these methods implemented ?
cheers
-vijay
What is the difference between a Graphics context and a Graphics object ?
Graphics class is an Abstract class -- then how can we have a Graphics object ?
In the paint method public void paint(Graphics g) :- what is exactly passed ...how does it expect a reference to an object of an abstract class ?
All methods of Graphics class are abstract e.g drawString(), drawRect() etc...they are not implemented in the Graphics class
Then where or in which subclass are these methods implemented ?
cheers
-vijay