1. Study Chapter 3G 2. Sign up repl,it and study

1. Study Chapter 3G

2. Sign up repl,it and study the example https://repl.it/join/aydclqoj-xtang

3. Design and implement your own GUI application

4. You can use other IDE such as eclips. Here is the code:

import javax.swing.JFrame;

import javax.swing.JPanel;

import java.awt.*;

/**

* Draws a snowman to demonstrate drawing methods and use of color.

* @author Java Foundations, converted to GUI by mvail

*/

public class Snowman extends JPanel

{

/**

* @param page object on which drawing takes place

*/

public void paintComponent (Graphics page)

  {

  final int MID = 150;

  final int TOP = 50;

  

  page.setColor(Color.CYAN);

  page.fillRect(0, 0, getWidth(), getHeight());

  

  Color groundColor = new Color(127, 0, 64);

  page.setColor (groundColor);

  page.fillRect (0, 175, 300, 50); // ground

  page.setColor (Color.yellow);

  page.fillOval (-40, -40, 80, 80); // sun

  page.setColor (Color.white);

  page.fillOval (MID – 20, TOP, 40, 40); // head

  page.fillOval (MID – 35, TOP + 35, 70, 50); // upper torso

  page.fillOval (MID – 50, TOP + 80, 100, 60); // lower torso

  page.setColor (Color.black);

  page.fillOval (MID – 10, TOP + 10, 5, 5); // left eye

  page.fillOval (MID + 5, TOP + 10, 5, 5); // right eye

  page.drawArc (MID – 10, TOP + 20, 20, 10, 190, 160); // smile

  page.drawLine (MID – 25, TOP + 60, MID – 50, TOP + 40); // left arm

  page.drawLine (MID + 25, TOP + 60, MID + 55, TOP + 60); // right arm

  page.drawLine (MID – 20, TOP + 5, MID + 20, TOP + 5); // brim of hat

  page.fillRect (MID – 15, TOP – 20, 30, 25); // top of hat

}

  

  /**

   * Constructor (panel initialization)

   */

  public Snowman()

  {

    setPreferredSize(new Dimension(300, 200));

  }

  

  

  /**

   * Starting point for Snowman application.

   * @param args unused

   */

  

}

public static void main (String[] args)

  {

    JFrame frame = new JFrame (“Snowman”);

    frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);

    frame.getContentPane().add(new Snowman());

    frame.pack();

    frame.setVisible(true);

  }

How Our Website Works

1. FILL IN OUR SIMPLE ORDER FORM

It has never been easier to place your order. Fill in the initial requirements in the small order form located on the home page and press “continue” button to proceed to the main order form or press “order” button in the header menu. Starting from there let our system intuitively guide you through all steps of ordering process.

2. PROCEED WITH THE PAYMENT

All your payments are processed securely through PayPal. This enables us to guarantee a 100% security of your funds and process payments swiftly.

3. WRITER ASSIGNMENT

Next, we match up your order details with the most qualified freelance writer in your field.

4. WRITING PROCESS

Once we have found the most suitable writer for your assignment, they start working on a masterpiece just for you!

5. DELIVERY

Once finished, your final paper will be available for download through your personal dashboard. You will also receive an email notification with a copy of your paper attached to it. Sometimes, the writer may leave a note for you about the order in case there is any additional information that they need to give you.

Leave a Reply

Your email address will not be published.