Deck 16: Graphics

ملء الشاشة (f)
exit full mode
سؤال
The drawRoundRect() method requires ____ arguments.

A) three
B) four
C) six
D) eight
استخدم زر المسافة أو
up arrow
down arrow
لقلب البطاقة.
سؤال
You can instruct a Graphics object to use a font by inserting the font as the argument in a ____ method.

A) setColor()
B) drawString()
C) setCharacters()
D) setFont()
سؤال
In Java, whether a paint request is triggered by the system or an application, a Component's paint() method is invoked.
سؤال
The ____ method draws what appears to be an empty rectangle.

A) clearRect()
B) emptyRect()
C) fillRect()
D) drawRect()
سؤال
The ____ method in the Graphics class allows you to draw a String on a JPanel or other component .

A) drawString()
B) setFont()
C) drawLine()
D) setString()
سؤال
The statements pen.drawLine(50, 50, 100, 200); and pen.drawLine(100, 200, 50, 50); will both draw straight lines that slant down and to the right.
سؤال
The drawPolygon() method requires four arguments, two integer arrays, and two single integers.
سؤال
System-triggered painting occurs when a program requests it, usually because the internal state of a component has changed.
سؤال
A rectangle created with the clearRect() method is not transparent.
سؤال
The getScreenSize()  method returns an object of type Pixels , which specifies the width  and height of the screen in pixels.
سؤال
The FontMetrics class methods return an integer value representing the font size in points, with one point measuring 1/72 of an inch.
سؤال
If you want to change graphic output on a panel in response to a user's mouse click, you would place a call to ____ in the actionPerformed() method.

A) paint()
B) paintComponent()
C) paintBorder()
D) repaint()
سؤال
The first step in drawing a 2D object is to specify how a drawn object is rendered.
سؤال
When a Swing object such as JPanel calls the repaint() method, it calls paint(), paintComponent(), paintBorder() , and which of the following?

A) paintChildren()
B) paintSuper()
C) paintBody()
D) paintGraphic()
سؤال
The ____ method requires four arguments and draws the outline of a rectangle using the current drawing color.

A) clearRect()
B) drawRect()
C) fillRect()
D) paintRect()
سؤال
When using the drawRoundRect() method, if you assign ____ to the arc coordinates, the rectangle is not rounded; instead, the corners are square.

A) -1
B) 0
C) 10
D) 99
سؤال
Both Rectangle2D.Float and Rectangle2D.Double can be created using four arguments representing the x-coordinate, y-coordinate, width, and height.
سؤال
You don't usually call the paint() method directly; instead the ____ method calls the paint() method.

A) destroy()
B) actionPerformed()
C) repaint()
D) super()
سؤال
The lineTo() method is used to define the beginning point of a polygon.
سؤال
You can instruct a Graphics object named g to produce green output by using which of the following statements?

A) g.makeColor(Color.GREEN);
B) g.makeColor(GREEN.Color);
C) g.setColor(Color.GREEN);
D) g.setColor( GREEN. Color);
سؤال
The ____ method provides information about the system in use.

A) getSystemInfo()
B) getDefaultToolkit()
C) getDefaultControlPanel()
D) getToolkit()
سؤال
If the beginning and ending points used with the fillPolygon() method are ____, the two endpoints are connected by a straight line before the polygon is filled with color.

A) connected
B) coordinate pairs
C) identical
D) not identical
سؤال
Which of the following statements starts a polygon named pol at the coordinates 20 and 290?

A) pol.moveTo(20F, 290F);
B) pol.lineTo(20F, 290F);
C) pol = new Path(20F, 290F);
D) pol.newPath(20F, 290F);
سؤال
You use the ____________________ method in statements to add points to a polygon.
سؤال
The ____________________ method can be used when a window needs to be updated, such as when it contains new images or you have moved a new object onto the screen.
سؤال
BasicStroke class variables determine the endcap and ____ style arguments.

A) stroke
B) line
C) juncture
D) fill
سؤال
You can discover the fonts that are available on your system by using the ____ method.

A) searchFonts()
B) findFonts()
C) findAllFonts()
D) getAvailableFontFamilyNames()
سؤال
The ____________________ method returns an object of type Dimension , which specifies the width and height of the screen in pixels.
سؤال
____ is the amount of space between the bottom of the descent of one line and the top of the characters in the successive line of type.

A) Descent
B) Ascent
C) Leading
D) Height of a line
سؤال
The ____ method creates a solid arc.

A) solidArc()
B) fillArc()
C) clearArc()
D) drawArc()
سؤال
The draw3DRect() method has a ____ argument, which controls whether the rectangle is darker on the right and bottom, or lighter on the right and bottom.

A) cyclic gradient
B) fill pattern
C) null
D) Boolean value
سؤال
Which FontMetrics class method returns information about the part of characters that hang below the baseline?

A) getLeading()
B) getAscent()
C) get_Descent()
D) getHeight()
سؤال
To create an arc object named halfArc that looks like the top half of a circle, which of the following statements can you use to produce identical results to this statement? halfArc.drawArc(x, y, w, h, 0, 180); .

A) halfArc.drawArc(x, y, w, h, 180, 0);
B) halfArc.drawArc(x, y, w, h, 180, -180);
C) halfArc.drawArc(x, y, w, h, -180, 180);
D) fillArc.drawArc(x, y, w, h, 180, -180);
سؤال
Which of the following statements will correctly add a point to a polygon named myShape ?

A) myShape.addPoint(50, 100)
B) addPoint = myShape(50, 100)
C) myShape.fillPolygon(50 100)
D) myShape = addPoint(50, 100)
سؤال
You can use the ____ method to copy any rectangular area to a new location.

A) copyRect()
B) copyArea()
C) copyGraphics()
D) addPoint()
سؤال
You can improve the appearance of strings drawn using Graphics objects by using the ____________________ method.
سؤال
You specify 2D colors by using the ____ method.

A) paint()
B) setPaint()
C) color()
D) setColor()
سؤال
You can instantiate an empty Polygon object using which of the following statements?

A) Polygon someFutureShape = new Polygon(0,0,0,0);
B) Polygon someFutureShape = new Polygon();
C) Polygon someFutureShape = new Polygon(0);
D) Polygon someFutureShape = new Polygon(xPoints, yPoints, xPoints.length);
سؤال
You use the ____________________ method to draw a rectangle that appears to have "shadowing" on two of its edges and light "highlights" on two others.
سؤال
Which of the following is a gradual shift from one color at one coordinate point to a different color at a second coordinate point?

A) color shift
B) gradient fill
C) fill pattern
D) cyclic fill
سؤال
Match between columns
A portion of a circle's circumference
painting
A portion of a circle's circumference
polygon
A portion of a circle's circumference
cyclic gradient
A portion of a circle's circumference
stroke
A portion of a circle's circumference
render
A portion of a circle's circumference
arc
A portion of a circle's circumference
ascent
A portion of a circle's circumference
gradient fill
A portion of a circle's circumference
descent
To paint or display a drawing
painting
To paint or display a drawing
polygon
To paint or display a drawing
cyclic gradient
To paint or display a drawing
stroke
To paint or display a drawing
render
To paint or display a drawing
arc
To paint or display a drawing
ascent
To paint or display a drawing
gradient fill
To paint or display a drawing
descent
A geometric figure with straight sides
painting
A geometric figure with straight sides
polygon
A geometric figure with straight sides
cyclic gradient
A geometric figure with straight sides
stroke
A geometric figure with straight sides
render
A geometric figure with straight sides
arc
A geometric figure with straight sides
ascent
A geometric figure with straight sides
gradient fill
A geometric figure with straight sides
descent
A gradual shift from one color to a different color
painting
A gradual shift from one color to a different color
polygon
A gradual shift from one color to a different color
cyclic gradient
A gradual shift from one color to a different color
stroke
A gradual shift from one color to a different color
render
A gradual shift from one color to a different color
arc
A gradual shift from one color to a different color
ascent
A gradual shift from one color to a different color
gradient fill
A gradual shift from one color to a different color
descent
Measures the height of an uppercase character from a baseline to the top
painting
Measures the height of an uppercase character from a baseline to the top
polygon
Measures the height of an uppercase character from a baseline to the top
cyclic gradient
Measures the height of an uppercase character from a baseline to the top
stroke
Measures the height of an uppercase character from a baseline to the top
render
Measures the height of an uppercase character from a baseline to the top
arc
Measures the height of an uppercase character from a baseline to the top
ascent
Measures the height of an uppercase character from a baseline to the top
gradient fill
Measures the height of an uppercase character from a baseline to the top
descent
A line-drawing feature in Java 2D that represents a single movement
painting
A line-drawing feature in Java 2D that represents a single movement
polygon
A line-drawing feature in Java 2D that represents a single movement
cyclic gradient
A line-drawing feature in Java 2D that represents a single movement
stroke
A line-drawing feature in Java 2D that represents a single movement
render
A line-drawing feature in Java 2D that represents a single movement
arc
A line-drawing feature in Java 2D that represents a single movement
ascent
A line-drawing feature in Java 2D that represents a single movement
gradient fill
A line-drawing feature in Java 2D that represents a single movement
descent
A fill pattern in which a shift between colors occurs repeatedly
painting
A fill pattern in which a shift between colors occurs repeatedly
polygon
A fill pattern in which a shift between colors occurs repeatedly
cyclic gradient
A fill pattern in which a shift between colors occurs repeatedly
stroke
A fill pattern in which a shift between colors occurs repeatedly
render
A fill pattern in which a shift between colors occurs repeatedly
arc
A fill pattern in which a shift between colors occurs repeatedly
ascent
A fill pattern in which a shift between colors occurs repeatedly
gradient fill
A fill pattern in which a shift between colors occurs repeatedly
descent
The act of redisplaying a surface
painting
The act of redisplaying a surface
polygon
The act of redisplaying a surface
cyclic gradient
The act of redisplaying a surface
stroke
The act of redisplaying a surface
render
The act of redisplaying a surface
arc
The act of redisplaying a surface
ascent
The act of redisplaying a surface
gradient fill
The act of redisplaying a surface
descent
Measures the part of characters that "hang below" the baseline
painting
Measures the part of characters that "hang below" the baseline
polygon
Measures the part of characters that "hang below" the baseline
cyclic gradient
Measures the part of characters that "hang below" the baseline
stroke
Measures the part of characters that "hang below" the baseline
render
Measures the part of characters that "hang below" the baseline
arc
Measures the part of characters that "hang below" the baseline
ascent
Measures the part of characters that "hang below" the baseline
gradient fill
Measures the part of characters that "hang below" the baseline
descent
سؤال
Write the statement to set the font of a Graphics object named myStyle to the font fancyFont .
سؤال
What activities does the process of drawing with Java 2D objects include?
سؤال
Write the statement to create an Arc2D.Float object named myArc at 20, 143, with a width of 50 and a height of 43; with a starting degree of 50, 140 degrees traveled; and using the class variable Arc2D.PIE .
سؤال
What parameters does the copyArea() method require?
سؤال
Describe what happens when a Swing component such as a JPanel calls the repaint() method.
سؤال
BasicStroke myLine = new BasicStroke(12.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND);
The above statement creates a BasicStroke object and makes it the current stroke. Describe the three arguments that are used in this statement, and then describe the purpose of each.
سؤال
To create a rectangle with rounded corners, the drawRoundRect() method is used. Describe the six arguments that are required to create rounded rectangles.
سؤال
How can a programmer find and gather all the available fonts on a computer system?
سؤال
Write the statement that uses an object named brush  to draw a string that says "I'm here" with the lower-left corner of the string appearing at coordinates x=100, y=110.
سؤال
How do you use the drawOval() method to draw an oval?
سؤال
The draw3DRect() method is used to draw rectangles that appear to have "shadowing" on two of their edges. Five arguments are used to create shadowed rectangles. Describe the five arguments.
سؤال
Write the statement to draw a rectangle using a graphics object named myRect that begins at position 30, 100 and is 150 pixels wide by 40 pixels tall.
سؤال
In the drawPolygon() method, what are the three arguments and what values do they represent?
سؤال
List the six arguments you need to provide for the drawArc() method.
سؤال
A Polygon object is created by defining movements from one point to another. Describe the statements that are used to create a Polygon object.
سؤال
Write the statement that will create a BasicStroke object named myLine and make it the current stroke. The line width should be 3, the endcap style should be CAP_ROUND and the juncture style should be JOIN_BEVEL .
سؤال
Why would a programmer use the repaint() method?
سؤال
What are the three arguments the BasicStroke constructor takes?
سؤال
What are the constructors for the Dimension class?
سؤال
The getFontMetrics() method can be used to discover a font's statistics. Describe the getLeading() , getAscent() , getDescent() , and getHeight() methods, and how they are used with the getFontMetrics() method.
سؤال
Write the statement to create a Rectangle2D.Float object named myRect at 20, 20 with a width of 80 and height of 50.
سؤال
Write the setPaint() statement that will set a cyclic gradient that cycles between red and yellow that begins at coordinates 40, 60 and ends at coordinates 210, 120. The 2D graphics object you use in the statement should be named graph2D.
سؤال
import javax.swing.*;
import java.awt.*;
import java.awt.Color;
public class JDemo3DRectangles extends JPanel
{
   @Override
   public void paint(Graphics gr)
   {
      super.paint(gr);
      final int WIDTH = 60, HEIGHT = 80;
      gr.setColor(Color.PINK);
      gr.fill3DRect(20, 40, WIDTH, HEIGHT, true);
      gr.fill3DRect(100, 40, WIDTH, HEIGHT, false);
   }
   public static void main(String[] args)
   {
      JFrame frame = new JFrame();
      frame.add(new JDemo3DRectangles());;
      frame.setSize(200, 180);
      frame.setVisible(true);
   }
}
The highlighted code above creates two filled 3D rectangles. Describe how the color of the rectangles is set, and explain the five arguments that are used to draw the rectangles.
سؤال
A rectangle is drawn with the following statement:
tool.drawRect(50, 50, 100, 60);
An oval is drawn with the following statement:
tool.drawOval(50, 50, 100, 60);
Describe the resulting output, and describe how the four arguments are used to draw the objects.
سؤال
Write the statement to instruct a Graphics object named myGraphic to apply blue paint.
فتح الحزمة
قم بالتسجيل لفتح البطاقات في هذه المجموعة!
Unlock Deck
Unlock Deck
1/66
auto play flashcards
العب
simple tutorial
ملء الشاشة (f)
exit full mode
Deck 16: Graphics
1
The drawRoundRect() method requires ____ arguments.

A) three
B) four
C) six
D) eight
C
2
You can instruct a Graphics object to use a font by inserting the font as the argument in a ____ method.

A) setColor()
B) drawString()
C) setCharacters()
D) setFont()
D
3
In Java, whether a paint request is triggered by the system or an application, a Component's paint() method is invoked.
True
4
The ____ method draws what appears to be an empty rectangle.

A) clearRect()
B) emptyRect()
C) fillRect()
D) drawRect()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
5
The ____ method in the Graphics class allows you to draw a String on a JPanel or other component .

A) drawString()
B) setFont()
C) drawLine()
D) setString()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
6
The statements pen.drawLine(50, 50, 100, 200); and pen.drawLine(100, 200, 50, 50); will both draw straight lines that slant down and to the right.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
7
The drawPolygon() method requires four arguments, two integer arrays, and two single integers.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
8
System-triggered painting occurs when a program requests it, usually because the internal state of a component has changed.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
9
A rectangle created with the clearRect() method is not transparent.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
10
The getScreenSize()  method returns an object of type Pixels , which specifies the width  and height of the screen in pixels.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
11
The FontMetrics class methods return an integer value representing the font size in points, with one point measuring 1/72 of an inch.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
12
If you want to change graphic output on a panel in response to a user's mouse click, you would place a call to ____ in the actionPerformed() method.

A) paint()
B) paintComponent()
C) paintBorder()
D) repaint()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
13
The first step in drawing a 2D object is to specify how a drawn object is rendered.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
14
When a Swing object such as JPanel calls the repaint() method, it calls paint(), paintComponent(), paintBorder() , and which of the following?

A) paintChildren()
B) paintSuper()
C) paintBody()
D) paintGraphic()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
15
The ____ method requires four arguments and draws the outline of a rectangle using the current drawing color.

A) clearRect()
B) drawRect()
C) fillRect()
D) paintRect()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
16
When using the drawRoundRect() method, if you assign ____ to the arc coordinates, the rectangle is not rounded; instead, the corners are square.

A) -1
B) 0
C) 10
D) 99
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
17
Both Rectangle2D.Float and Rectangle2D.Double can be created using four arguments representing the x-coordinate, y-coordinate, width, and height.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
18
You don't usually call the paint() method directly; instead the ____ method calls the paint() method.

A) destroy()
B) actionPerformed()
C) repaint()
D) super()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
19
The lineTo() method is used to define the beginning point of a polygon.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
20
You can instruct a Graphics object named g to produce green output by using which of the following statements?

A) g.makeColor(Color.GREEN);
B) g.makeColor(GREEN.Color);
C) g.setColor(Color.GREEN);
D) g.setColor( GREEN. Color);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
21
The ____ method provides information about the system in use.

A) getSystemInfo()
B) getDefaultToolkit()
C) getDefaultControlPanel()
D) getToolkit()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
22
If the beginning and ending points used with the fillPolygon() method are ____, the two endpoints are connected by a straight line before the polygon is filled with color.

A) connected
B) coordinate pairs
C) identical
D) not identical
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
23
Which of the following statements starts a polygon named pol at the coordinates 20 and 290?

A) pol.moveTo(20F, 290F);
B) pol.lineTo(20F, 290F);
C) pol = new Path(20F, 290F);
D) pol.newPath(20F, 290F);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
24
You use the ____________________ method in statements to add points to a polygon.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
25
The ____________________ method can be used when a window needs to be updated, such as when it contains new images or you have moved a new object onto the screen.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
26
BasicStroke class variables determine the endcap and ____ style arguments.

A) stroke
B) line
C) juncture
D) fill
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
27
You can discover the fonts that are available on your system by using the ____ method.

A) searchFonts()
B) findFonts()
C) findAllFonts()
D) getAvailableFontFamilyNames()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
28
The ____________________ method returns an object of type Dimension , which specifies the width and height of the screen in pixels.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
29
____ is the amount of space between the bottom of the descent of one line and the top of the characters in the successive line of type.

A) Descent
B) Ascent
C) Leading
D) Height of a line
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
30
The ____ method creates a solid arc.

A) solidArc()
B) fillArc()
C) clearArc()
D) drawArc()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
31
The draw3DRect() method has a ____ argument, which controls whether the rectangle is darker on the right and bottom, or lighter on the right and bottom.

A) cyclic gradient
B) fill pattern
C) null
D) Boolean value
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
32
Which FontMetrics class method returns information about the part of characters that hang below the baseline?

A) getLeading()
B) getAscent()
C) get_Descent()
D) getHeight()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
33
To create an arc object named halfArc that looks like the top half of a circle, which of the following statements can you use to produce identical results to this statement? halfArc.drawArc(x, y, w, h, 0, 180); .

A) halfArc.drawArc(x, y, w, h, 180, 0);
B) halfArc.drawArc(x, y, w, h, 180, -180);
C) halfArc.drawArc(x, y, w, h, -180, 180);
D) fillArc.drawArc(x, y, w, h, 180, -180);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
34
Which of the following statements will correctly add a point to a polygon named myShape ?

A) myShape.addPoint(50, 100)
B) addPoint = myShape(50, 100)
C) myShape.fillPolygon(50 100)
D) myShape = addPoint(50, 100)
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
35
You can use the ____ method to copy any rectangular area to a new location.

A) copyRect()
B) copyArea()
C) copyGraphics()
D) addPoint()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
36
You can improve the appearance of strings drawn using Graphics objects by using the ____________________ method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
37
You specify 2D colors by using the ____ method.

A) paint()
B) setPaint()
C) color()
D) setColor()
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
38
You can instantiate an empty Polygon object using which of the following statements?

A) Polygon someFutureShape = new Polygon(0,0,0,0);
B) Polygon someFutureShape = new Polygon();
C) Polygon someFutureShape = new Polygon(0);
D) Polygon someFutureShape = new Polygon(xPoints, yPoints, xPoints.length);
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
39
You use the ____________________ method to draw a rectangle that appears to have "shadowing" on two of its edges and light "highlights" on two others.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
40
Which of the following is a gradual shift from one color at one coordinate point to a different color at a second coordinate point?

A) color shift
B) gradient fill
C) fill pattern
D) cyclic fill
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
41
Match between columns
A portion of a circle's circumference
painting
A portion of a circle's circumference
polygon
A portion of a circle's circumference
cyclic gradient
A portion of a circle's circumference
stroke
A portion of a circle's circumference
render
A portion of a circle's circumference
arc
A portion of a circle's circumference
ascent
A portion of a circle's circumference
gradient fill
A portion of a circle's circumference
descent
To paint or display a drawing
painting
To paint or display a drawing
polygon
To paint or display a drawing
cyclic gradient
To paint or display a drawing
stroke
To paint or display a drawing
render
To paint or display a drawing
arc
To paint or display a drawing
ascent
To paint or display a drawing
gradient fill
To paint or display a drawing
descent
A geometric figure with straight sides
painting
A geometric figure with straight sides
polygon
A geometric figure with straight sides
cyclic gradient
A geometric figure with straight sides
stroke
A geometric figure with straight sides
render
A geometric figure with straight sides
arc
A geometric figure with straight sides
ascent
A geometric figure with straight sides
gradient fill
A geometric figure with straight sides
descent
A gradual shift from one color to a different color
painting
A gradual shift from one color to a different color
polygon
A gradual shift from one color to a different color
cyclic gradient
A gradual shift from one color to a different color
stroke
A gradual shift from one color to a different color
render
A gradual shift from one color to a different color
arc
A gradual shift from one color to a different color
ascent
A gradual shift from one color to a different color
gradient fill
A gradual shift from one color to a different color
descent
Measures the height of an uppercase character from a baseline to the top
painting
Measures the height of an uppercase character from a baseline to the top
polygon
Measures the height of an uppercase character from a baseline to the top
cyclic gradient
Measures the height of an uppercase character from a baseline to the top
stroke
Measures the height of an uppercase character from a baseline to the top
render
Measures the height of an uppercase character from a baseline to the top
arc
Measures the height of an uppercase character from a baseline to the top
ascent
Measures the height of an uppercase character from a baseline to the top
gradient fill
Measures the height of an uppercase character from a baseline to the top
descent
A line-drawing feature in Java 2D that represents a single movement
painting
A line-drawing feature in Java 2D that represents a single movement
polygon
A line-drawing feature in Java 2D that represents a single movement
cyclic gradient
A line-drawing feature in Java 2D that represents a single movement
stroke
A line-drawing feature in Java 2D that represents a single movement
render
A line-drawing feature in Java 2D that represents a single movement
arc
A line-drawing feature in Java 2D that represents a single movement
ascent
A line-drawing feature in Java 2D that represents a single movement
gradient fill
A line-drawing feature in Java 2D that represents a single movement
descent
A fill pattern in which a shift between colors occurs repeatedly
painting
A fill pattern in which a shift between colors occurs repeatedly
polygon
A fill pattern in which a shift between colors occurs repeatedly
cyclic gradient
A fill pattern in which a shift between colors occurs repeatedly
stroke
A fill pattern in which a shift between colors occurs repeatedly
render
A fill pattern in which a shift between colors occurs repeatedly
arc
A fill pattern in which a shift between colors occurs repeatedly
ascent
A fill pattern in which a shift between colors occurs repeatedly
gradient fill
A fill pattern in which a shift between colors occurs repeatedly
descent
The act of redisplaying a surface
painting
The act of redisplaying a surface
polygon
The act of redisplaying a surface
cyclic gradient
The act of redisplaying a surface
stroke
The act of redisplaying a surface
render
The act of redisplaying a surface
arc
The act of redisplaying a surface
ascent
The act of redisplaying a surface
gradient fill
The act of redisplaying a surface
descent
Measures the part of characters that "hang below" the baseline
painting
Measures the part of characters that "hang below" the baseline
polygon
Measures the part of characters that "hang below" the baseline
cyclic gradient
Measures the part of characters that "hang below" the baseline
stroke
Measures the part of characters that "hang below" the baseline
render
Measures the part of characters that "hang below" the baseline
arc
Measures the part of characters that "hang below" the baseline
ascent
Measures the part of characters that "hang below" the baseline
gradient fill
Measures the part of characters that "hang below" the baseline
descent
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
42
Write the statement to set the font of a Graphics object named myStyle to the font fancyFont .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
43
What activities does the process of drawing with Java 2D objects include?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
44
Write the statement to create an Arc2D.Float object named myArc at 20, 143, with a width of 50 and a height of 43; with a starting degree of 50, 140 degrees traveled; and using the class variable Arc2D.PIE .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
45
What parameters does the copyArea() method require?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
46
Describe what happens when a Swing component such as a JPanel calls the repaint() method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
47
BasicStroke myLine = new BasicStroke(12.0f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_ROUND);
The above statement creates a BasicStroke object and makes it the current stroke. Describe the three arguments that are used in this statement, and then describe the purpose of each.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
48
To create a rectangle with rounded corners, the drawRoundRect() method is used. Describe the six arguments that are required to create rounded rectangles.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
49
How can a programmer find and gather all the available fonts on a computer system?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
50
Write the statement that uses an object named brush  to draw a string that says "I'm here" with the lower-left corner of the string appearing at coordinates x=100, y=110.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
51
How do you use the drawOval() method to draw an oval?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
52
The draw3DRect() method is used to draw rectangles that appear to have "shadowing" on two of their edges. Five arguments are used to create shadowed rectangles. Describe the five arguments.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
53
Write the statement to draw a rectangle using a graphics object named myRect that begins at position 30, 100 and is 150 pixels wide by 40 pixels tall.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
54
In the drawPolygon() method, what are the three arguments and what values do they represent?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
55
List the six arguments you need to provide for the drawArc() method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
56
A Polygon object is created by defining movements from one point to another. Describe the statements that are used to create a Polygon object.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
57
Write the statement that will create a BasicStroke object named myLine and make it the current stroke. The line width should be 3, the endcap style should be CAP_ROUND and the juncture style should be JOIN_BEVEL .
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
58
Why would a programmer use the repaint() method?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
59
What are the three arguments the BasicStroke constructor takes?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
60
What are the constructors for the Dimension class?
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
61
The getFontMetrics() method can be used to discover a font's statistics. Describe the getLeading() , getAscent() , getDescent() , and getHeight() methods, and how they are used with the getFontMetrics() method.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
62
Write the statement to create a Rectangle2D.Float object named myRect at 20, 20 with a width of 80 and height of 50.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
63
Write the setPaint() statement that will set a cyclic gradient that cycles between red and yellow that begins at coordinates 40, 60 and ends at coordinates 210, 120. The 2D graphics object you use in the statement should be named graph2D.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
64
import javax.swing.*;
import java.awt.*;
import java.awt.Color;
public class JDemo3DRectangles extends JPanel
{
   @Override
   public void paint(Graphics gr)
   {
      super.paint(gr);
      final int WIDTH = 60, HEIGHT = 80;
      gr.setColor(Color.PINK);
      gr.fill3DRect(20, 40, WIDTH, HEIGHT, true);
      gr.fill3DRect(100, 40, WIDTH, HEIGHT, false);
   }
   public static void main(String[] args)
   {
      JFrame frame = new JFrame();
      frame.add(new JDemo3DRectangles());;
      frame.setSize(200, 180);
      frame.setVisible(true);
   }
}
The highlighted code above creates two filled 3D rectangles. Describe how the color of the rectangles is set, and explain the five arguments that are used to draw the rectangles.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
65
A rectangle is drawn with the following statement:
tool.drawRect(50, 50, 100, 60);
An oval is drawn with the following statement:
tool.drawOval(50, 50, 100, 60);
Describe the resulting output, and describe how the four arguments are used to draw the objects.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
66
Write the statement to instruct a Graphics object named myGraphic to apply blue paint.
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.
فتح الحزمة
k this deck
locked card icon
فتح الحزمة
افتح القفل للوصول البطاقات البالغ عددها 66 في هذه المجموعة.