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 size of int in 64-bit jvm?

0 Answers  


What is flush () in java?

0 Answers  


What is java object name?

0 Answers  


Explain where variables are created in memory?

0 Answers  


What is diffrance between FINALIZE() & FINALLY ?

2 Answers   Infosys,






'A class is a template for an object' explain this statement.

0 Answers   Akamai Technologies,


Difference between abtsract & final

1 Answers   Nous,


How does arrays sort work in java?

0 Answers  


what is the Arraylist limit (maximum) by default ?

13 Answers   Fidelity, PlanetSoft, Wipro,


Will the compiler creates a default constructor if I have a parameterized constructor in the class?

0 Answers  


What differences exist between iterator and listiterator?

0 Answers  


How many bytes is a string in java?

0 Answers  


Categories