CirclePanel -...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: //******************************************************************** // CirclePanel.java // // Represents the primary panel for the Circles program on which the // circles are drawn. Derived from the Lewis and Loftus DotsPanel class. //******************************************************************** import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class CirclePanel extends JPanel { private final int WIDTH = 600, HEIGHT = 400; private Circle circle; //----------------------------------------------------------------- // Sets up this panel to listen for mouse events. //----------------------------------------------------------------- public CirclePanel() { CirclesListener listener = new CirclesListener(); addMouseListener (listener); addMouseMotionListener (listener); setPreferredSize (new Dimension(WIDTH, HEIGHT)); } //----------------------------------------------------------------- // Draws the current circle, if any....
View Full Document

Page1 / 2

CirclePanel -...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online