Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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

What is the difference between Java and C++?

0 Answers   Integreon, TCS, ZS Associates,

Why is stringbuffer called mutable?

0 Answers  

What are pass by reference and pass by value?

0 Answers  

How the metacharacters are different from the ordinary characters?

0 Answers  

How to declare objects of a class ?

0 Answers   Akamai Technologies,

What is the difference between math floor and math round?

0 Answers  

What is the use of TL?

0 Answers  

Can a class extend abstract class or interface? why

4 Answers   Wipro,

Can substring create new object?

0 Answers  

what is use of marker interface? give me good example?

2 Answers  

What is identifier give example?

0 Answers  

Is set sorted in java?

0 Answers