RubberLinesPanel - RubberLinesPanel.java Author...

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: //******************************************************************** // RubberLinesPanel.java Author: Lewis/Loftus // // Solution to Programming Project 7.9 //******************************************************************** / import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.Vector; i public class RubberLinesPanel extends JPanel { private Point point1 = null, point2 = null; private Vector lines; //----------------------------------------------------------------- // Sets up the applet to listen for mouse events. //----------------------------------------------------------------- public RubberLinesPanel() { lines = new Vector(); LineListener listener = new LineListener(); addMouseListener (listener); addMouseMotionListener (listener); setBackground (Color.black); } //----------------------------------------------------------------- // Draws the current line from the intial mouse down point to // the current position of the mouse....
View Full Document

This note was uploaded on 05/17/2011 for the course COP 3530 taught by Professor Davis during the Spring '08 term at University of Florida.

Page1 / 2

RubberLinesPanel - RubberLinesPanel.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