practice-Graphics - CSE 205 Fall 2008 Practice Graphics...

This preview shows page 1 - 3 out of 3 pages.

CSE 205 - Fall 2008 – Practice Graphics & Mouse ListenerFirst Name (Print)___________________ Last Name _________________Date____1. Complete the code in the Shapesclass so that it will generates the applet showing the graphics below. It contains five squares in blue, and four arcs in red. The size of this applet is 400 by 400.Each square is twice as large as the square below it except two squares at the right bottom corner that are of the same size. import javax.swing.*;import java.awt.*;public class Shapes extends JApplet{public void paint (Graphics page){setSize(400,400);
2. Complete the code in the PointPanelclass such that each time a user presses a mouse button, the coordinate of the point that was pressed appears in red color together with a small dot

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture