ControlPanel

ControlPanel - / Assignment #: / Name: / StudentID: /...

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

View Full Document Right Arrow Icon
// Assignment #: 12 // Name: your name // StudentID: your id // Lecture: your lecture // Description: it needs to be filled. / import javax.swing.*; i import java.awt.*; import java.awt.event.*; import javax.swing.event.*; i public class ControlPanel extends JPanel { private FanPanel fan1, fan2; private int width, height; private JButton buttonStartRed; private JButton buttonStopRed; private JButton buttonReverseRed; private JButton buttonStartBlue; private JButton buttonStopBlue; private JButton buttonReverseBlue; private JLabel redFanDelay, blueFanDelay; private JSlider sliderRed, sliderBlue; p public ControlPanel(int width, int height) { this.width = width; this.height = height; t // create two fan panels, one with read, another with blue fan1 = new FanPanel(Color.red, width / 2); fan2 = new FanPanel(Color.blue, width / 2); buttonStartRed = new JButton("Start Red"); buttonStopRed = new JButton("Stop Red"); buttonReverseRed = new JButton("Reverse Red"); b buttonStartBlue = new JButton("Start Blue"); buttonStopBlue = new JButton("Stop Blue"); buttonReverseBlue = new JButton("Reverse Blue"); b redFanDelay = new JLabel("Red Fan Delay"); blueFanDelay = new JLabel("Blue Fan Delay");
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 / 3

ControlPanel - / Assignment #: / Name: / StudentID: /...

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