Describe graphics objects, JAVA Programming

Assignment Help:

Describe Graphics Objects ?

In Java all drawing takes place via a Graphics object. This is an example of the class java.awt.Graphics.

Initially the Graphics object you use will be the one passed as an argument to an applet's paint() method. Later you'll see other Graphics objects too. Everything you learn presently about drawing in an applet transfers directly to drawing in other objects such as Panels, Buttons, Frames, Canvases and more.

Each Graphics object has its own coordinate system, and all the techniques of Graphics involves those for drawing Strings, lines, rectangles, circles, polygons and more. Drawing in Java begins with particular Graphics object. You get access to the Graphics object through the paint(Graphics g) method of your applet. Each draw method call will look like g.drawString("Hello World", 0, 50) where g is the particular Graphics object with that you're drawing.

For convenience's sake in this lecture the variable g will always refer to a preexisting object of the Graphics class. As with any other method you are free to use a few other name for the particular Graphics context, myGraphics or appletGraphics perhaps.


Related Discussions:- Describe graphics objects

Explain why java does not support multiple inheritance, Question: (a) ...

Question: (a) Differentiate between the following terms using suitable examples of your own:- (i) inheritance v/s composition (ii) subclass v/s superclass (iii) softwa

Online Store Website, Project Requirements • Create your own online store ...

Project Requirements • Create your own online store Web site, selling products of your choice. • Create pages that allow you to search and buy available products, as well as add,

How dos attack is a cyber crime what cyber crime can be used, How DoS attac...

How DoS attack is a cyber crime? For what cyber crime can be used? DoS stands for Decline of Service and it is a cyber crime as it jams and within a few cases shut down the goa

What is an introduction in aop, An introduction permits the user to add new...

An introduction permits the user to add new methods or attributes to an existing class. This can then be explained to an existing class without having to change the structure of th

What is javaserver faces expression language, A easy expression language us...

A easy expression language used by a JavaServer Faces UI component tag attributes to bind the associated component to a bean property or to bind the associated component's value to

Explain what is local variable, Explain what is Local Variable ? Declar...

Explain what is Local Variable ? Declaring variables (using the var keyword) inside a function forms them local. They are available only inside the function and hold no meaning

Programing, A servey is done in M.P. by forest department finding different...

A servey is done in M.P. by forest department finding different types of species of birds the servey data covered four major cities indore,Bhopal,Gwalior,vidhisa. The result they o

What are the two important tcp socket classes, Socket and ServerSocket. Ser...

Socket and ServerSocket. ServerSocket is used for normal two-way socket communication. Socket class permits us to read and write by the sockets. getInputStream() and getOutputStrea

Automated the claim sub-system, Automated the claim sub-system: Insur...

Automated the claim sub-system: Insurance Domain:       CIA-MI   Type                                         Development - Web-based Application Role

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd