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

program to brute force search, Introduction As an alternative to the B...

Introduction As an alternative to the Binary Search algorithm, also it could be done by the brute-force method given below. public static int rank(int key, int[] a) {     f

Loops, Use a while loop to count down from 100 and display all the numbers ...

Use a while loop to count down from 100 and display all the numbers in the * following pattern (you have to figure out what the pattern is - don''t go below 0): * 100 99 97 94

What is an xml namespace?, Question 1 What is Response Redirection? Explai...

Question 1 What is Response Redirection? Explain in brief Question 2 What is JDBC? Explain Question 3 Write a short note on Expressions Question 4 What is an XML na

I want java web developer, Project Description: A web developer is requi...

Project Description: A web developer is required to finish a webcam site with basic account management and voting functionality. The website can make use of a third party fla

Develop a color picker, Project Description: We need same kind of concep...

Project Description: We need same kind of concept with some changes # Change single colors in a particular design. you need to be able to change the color of only the fox or

Thread, create thread without extending anything

create thread without extending anything

Which is better to store data as attributes or as elements? , A question ri...

A question rising in the mind of XML/DTD designers is whether to model and encode retain information using an attribute, or alternatively, using an element. 1. Using  an  elemen

What is constraints explain with example, What is Constraints explain with ...

What is Constraints explain with example? One of the purposes to use constructors and setter techniques rather than directly accessing fields is to enforce constraints. For exa

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