{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


ControlPanel - Assignment Name StudentID Lecture...

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; public ControlPanel(int width, int height) { this.width = width; this.height = height; //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"); buttonStartBlue = new JButton("Start Blue"); buttonStopBlue = new JButton("Stop Blue"); buttonReverseBlue = new JButton("Reverse Blue");
Background image of page 1

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

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

{[ snackBarMessage ]}