Abacus Beads, Java(pair with Abacus Driver)

Abacus Beads, Java(pair with Abacus Driver) - return...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
import java.awt.event.MouseEvent; public class Beads extends ClickOval{ public boolean selected; private int value; public Driver driver; private int total; public Beads (boolean s, int n, int x, int y, Driver d){ super(x,y); selected = s; value = n; driver = d; } public int getValue(){ return value; } public boolean getStatus(){
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: return selected; } public void mousePressed(MouseEvent e) { if(selected == false){ selected = true; setLocation(getX(),getY()-81); driver.recalculateLabel(value); }else{ selected = false; setLocation(getX(),getY()+81); driver.recalculateLabel(-value); } } }...
View Full Document

This note was uploaded on 04/28/2008 for the course C-S 220 taught by Professor Riley during the Fall '07 term at Wisc La Crosse.

Ask a homework question - tutors are online