Difference between canvas class & graphics class?



Difference between canvas class & graphics class?..

Answer / mallareddy.pindi

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

Post New Answer

More Core Java Interview Questions

How do you compare two objects?

0 Answers  


How many types of the indexof method are there for strings?

0 Answers  


What is the difference between the boolean & operator and the && operator in java programming?

0 Answers  


Can we create a class inside a class in java?

0 Answers  


Can a static method be final?

0 Answers  






How do we access static members in java?

0 Answers  


What is difference between public static and void?

0 Answers  


What is difference between wait and notify in java?

0 Answers  


What is update method called?

0 Answers  


Who developed JScript language?

3 Answers  


how come we know the object is no more used in the class?

2 Answers   Accenture,


How to create a fecelet view?

0 Answers  


Categories