Difference between canvas class & graphics class?
The Canvas class is a base class for writing applications
that need to handle low-level events and to issue graphics
calls for drawing to the display. Game applications will
likely make heavy use of the Canvas class. From an
application development perspective, the Canvas class is
interchangeable with standard Screen classes, so an
application may mix and match Canvas with high-level screens
as needed. For example, a List screen may be used to select
the track for a racing game, and a Canvas subclass would
implement the actual game.
The Graphics class provides the framework for all graphics
operations within the AWT. It plays two different, but
related, roles. First, it is the graphics context. The
graphics context is information that will affect drawing
operations. This includes the background and foreground
colors, the font, and the location and dimensions of the
clipping rectangle
| Is This Answer Correct ? | 13 Yes | 1 No |
Which one will take more memory: an int or integer?
Difference between JVM and JRE?
Can we create an object if a class doesn't have any constructor ( not even the default provided by constructor ) ?
What’s the difference between applets and standalone program?
How to perform binary search in java?
What is an immutable class?
Difference between Interface & Abstract class?
What is difference between static variable and global variable?
Do I need java for windows 10?
how many ways to create Thread and which one is good? runnable interface ot Thread class?
Can constructor be synchronized?
Why charat is used in java?