Please Help and answer all questions Please I could really u

(Please Help and answer all questions) (Please I could really use the help. You can just highliht if you want

Highlight Answers to end of Chapter Review Questions:

1) Repainting of a visible surface is triggered by . a) the operating system b) the application c) either of these d) none of thes

2) The method that calls the paint() method for you is . a) callPaint() b) repaint() c) requestPaint() d) draw()

3) The paint() method header requires a(n) argument. a) void b) integer c) String d) Graphics

4) The setLocation() method . a) is used to position a JFrame on the screen b) is used to set regional and national preferences for an application c) takes two integer arguments that represent position coordinates d) must be used with every component placed on a JFrame

5) The statement g.drawString(someString, 50, 100); places someString’s corner at position 50, 100. a) upper-left b) lower-left c) upper-right d) lower-right

6) If you use the setColor() method to change a Graphics object’s color to yellow, . a) only the next output from the object appears in yellow b) all output from the object for the remainder of the method always appears in yellow c) all output from the object for the remainder of the application always appears in yellow d) all output from the object appears in yellow until you change the color

7) The correct statement to instantiate a Graphics object named Picasso is . a) Graphics picasso; b) Graphics picasso = new Graphics(); c) Graphics picasso = getGraphics(); d) Graphics picasso = getGraphics(new);

8) The statement g.drawRoundRect(100, 100, 100, 100, 0, 0); draws a shape that looks most like a . a) square b) round-edged rectangle c) circle d) straight line

9) If you draw an oval with the same value for width and height, you draw a(n) . a) circle b) square c) rounded square d) ellipsis 10)

10. The zero-degree position for any arc is at the o’clock position. a) three b) six c) nine d) twelve

11) The method you use to create a solid arc is . a) solidArc() b) fillArc() c) arcSolid() d) arcFill()

12) You use the method to copy any rectangular area to a new location. a) copyRect() b) copyArea() c) repeatRect() d) repeatArea()

13) The measurement of an uppercase character from the baseline to the top of the character is its . a) ascent b) descent c) leading d) height

14) To be certain that a vertical series of Strings has enough room to appear in a frame, you use which of the following statements? a) g.drawString(\"Some string\", x, y += g.getFontMetrics().getHeight()); b) g.drawString(\"Some string\", x, y += g.getFontMetrics().getLeading()); c) g.drawString(\"Some string\", x, y += g.getFontMetrics().getAscent()); d) g.drawString(\"Some string\", x, y += g.getFontMetrics().getDescent());

15) You can discover the fonts that are available on your system by using the . a) getAvailableFontFamilyNames() method of the GraphicsEnvironment class b) getFonts() method of the Graphics class c) getMyFonts() method of the GraphicsFonts class d) getAllFonts() method of the Fonts class

16) The getScreenResolution() method and getScreenSize() method . a) both return the number of pixels as an int type b) respectively return the number of pixels as an int type and an object of type Dimension c) both return an object of type Dimension d) respectively return the number of pixels as a double type and an object of type Dimension

17) A Graphics2D object is produced by . a) the setGraphics2D() method b) the Graphics2D newpen = Graphics2D() statement c) the Graphics2D = Graphics(g) statement d) casting a Graphics object

18) The process of drawing with Java 2D objects includes . a) specifying the rendering attributes b) setting a drawing stroke c) both of the above d) none of the above

19) A gradient fill is a gradual change in . a) color b) font size c) drawing style d) line thickness

20) With the 2D methods, the drawing line is a . a) brush b) stroke c) belt d) draw

Solution

Answer:

1) a) either of these

Repainting of a visible surface is triggered by either of these operating system and the application.

2) b) repaint

The method that calls the paint() method for you is repaint()

3) d) Graphics

The paintComponent is only allowed to take Graphics class object. It doesn\'t take an integer value to render the objects on the JFrame applications.

4) c) takes two integer arguments that represent position coordinates

setLocation() method to specify the size and position of a widget or component.

5) c) upper-right

someString’s corner at position 50, 100 at upper-right of the frame

6) d) all output from the object appears in yellow until you change the color

(Please Help and answer all questions) (Please I could really use the help. You can just highliht if you want Highlight Answers to end of Chapter Review Questio
(Please Help and answer all questions) (Please I could really use the help. You can just highliht if you want Highlight Answers to end of Chapter Review Questio

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site