{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

DrawPersonPanel - DrawPersonPanel.java The panel for a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
// **************************************************************** // DrawPersonPanel.java // // The panel for a program that uses the Graphics draw methods to // draw a person. // **************************************************************** import javax.swing.JPanel; import java.awt.*; public class DrawPersonPanel extends JPanel { private final int WIDTH = 600; private final int HEIGHT = 400; private int[] shirtX = {60,0,20,60,50,130,120,160,180,120}; private int[] shirtY = {100,150,180,160,250,250,160,180,150,100}; private int[] pantsX = {50,40,80,90,100,140,130}; private int[] pantsY = {250,400,400,290,400,400,250}; private int headX = 60; private int headY = 30; private int[] hairX = {62,70,75,80,85,90,95,100,105,110,118, 112, 102, 93, 81, 73, 62}; private int[] hairY = {55,28,32,26,30,26,31,25,32,28,55, 48, 44, 40, 42, 44, 55}; private int[] zigzagX = {60, 70, 80, 90, 100, 110, 120}; private int[] zigzagY = {130,140,130,140,130,140,130}; //-------------------------------------- // Constructor: Set up the panel. //-------------------------------------- public DrawPersonPanel () { setPreferredSize(new Dimension(WIDTH, HEIGHT)); } //-------------------------------------- // Draw person
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}