What is paint method? What should we put in paint method? When is it invoked? - The AWT uses a Callback mechanism for painting which is the same for heavyweight and lightweight components.
- The components rendering code should be inside a program's overridden method so that the AWT can invoke it while painting.
- When AWT invokes this method, the Graphics object parameter is pre-configured with the appropriate state for drawing.
|