Abacus Driver, Java (pair with Abacus Beads)

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

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

View Full Document Right Arrow Icon
import javax.swing.*; import java.awt.*; public class Driver { private JFrame win; private JLabel totallabel; public int total; private Color vibrant; public Driver() { vibrant = new Color(0,163,101); Rectangle rect[] = new Rectangle[8]; win = new JFrame ("Abacus"); win.setBounds(50,50,500,600); win.setBackground(vibrant); win.setVisible(true); win.setLayout(null); rect[0] = new Rectangle(90,70,320,10); rect[1] = new Rectangle(90,70,10,340); rect[2] = new Rectangle(400,70,10,340); rect[3] = new Rectangle(90,400,320,10); rect[4] = new Rectangle(90,210,320,10); rect[5] = new Rectangle(170,70,4,340); rect[6] = new Rectangle(250,70,4,340); rect[7] = new Rectangle(330,70,4,340); win.add(rect[0],0); win.add(rect[1],0); win.add(rect[2],0); win.add(rect[3],0); win.add(rect[4],0); win.add(rect[5],0); win.add(rect[6],0); win.add(rect[7],0); Beads ones[] = new Beads[5]; Beads tens[] = new Beads[5]; Beads hundreds[] = new Beads[5]; Beads fives[] = new Beads[2]; Beads fifties[] = new Beads[2]; Beads fivehundreds[] = new Beads[2];
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

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

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