RubberCirclePanel - /* / RubberCirclePanel.java Author:...

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

View Full Document Right Arrow Icon
//******************************************************************** // RubberCirclePanel.java Author: Lewis and Loftus / Alicia Nicoll // // Solution to Programming Project 7.12 //******************************************************************** / import javax.swing.*; import java.awt.*; import java.awt.event.*; i public class RubberCirclePanel extends JPanel { private Point center = null, current = null; //----------------------------------------------------------------- // Initializes the panel //----------------------------------------------------------------- public RubberCirclePanel () { RubberCircleListener listener = new RubberCircleListener(); addMouseListener (listener); addMouseMotionListener (listener); setBackground (Color.black); } //----------------------------------------------------------------- // Draws the current circle centered around an original point. //----------------------------------------------------------------- public void paintComponent (Graphics page)
Background image of page 1

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

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

Page1 / 2

RubberCirclePanel - /* / RubberCirclePanel.java Author:...

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