Assignment 12 JApplet,, - The Applet (JApplet) of your program should contain six buttons
    Assignment 12 JApplet,, - The Applet (JApplet) of your program should contain six buttons

Assignment 12 JApplet,, - The Applet (JApplet) of your program should contain six buttons


Assignment #12

Due: Tuesday, April 24th, at 7pm

Important: This is an individual assignment. Please do not collaborate.

Requirements to get full credits in Documentation

  1. The assignment number, your name, StudentID, and Lecture number need to be included at the top of each file/class.
  2. An overview/purpose of each class needs to be described at the top of each class.
  3. A description of each method is also needed.
  4. Some additional comments inside of methods to explain codes that are hard to follow should be written.

You can look at the Java programs in the text book to see how comments are added to programs.

Minimal Submitted Files

You are required, but not limited, to turn in the following source files: Assignment12 class extends JApplet) (It extends JPanel, to be completed) (It extends JPanel)

You may add more classes or more methods than they are specified. (You might need them.)

Skills to be Applied:

Classes may be needed: 
Timer in javax.swing package, JApplet, JButton, Container, JPanel, Color, Graphics, JSlider, JLabel, ActionListener, ActionEvent, ChangeListener, ChangeEvent. You may use other classes.

Program Description

Suggested Class Diagram: (.ppt file is available for this figure)

Write a Java program that constructs an Applet.

The Applet (JApplet) of your program should contain six buttons, "Start Red", "Stop Red", "Reverse Red", "Start Blue", "Stop Blue", and "Reverse Blue". The first three buttons will be organized vertically, and the latter three buttons will also be organized vertically. Next to each set of buttons, there will be a label "Red Fan Delay" (or "Blue Fan Delay"), then below it, there will be a slider that a user can use to change the delay of each fan. Note that if the delay (interval) of a fan decreases, its speed will be faster. Below the buttons and sliders, there are two panels, one panel showing a red fan moving counter-clockwise, and the other panel showing a blue fan moving counter-clockwise. The picture below shows the initial position of each fan. Each fan consists of two filled arcs, and black un-filled circle to show its perimeter.

When "Stop" button is pushed, corresponding fan (of the color) stops. When "Start" button is pushed, the fan start moving to the direction that it was going before it stopped. "Reverse" reverses the direction of a fan, thus if it was moving counter-clockwise, then it should start moving clockwise, and vice versa. If the fan was not moving when "Reverse" button is pushed, then the fan should start moving after changing its direction.

By moving each slider, a user should be able to change the delay interval of each fan. When a delay decreases, the corresponding fan should move faster, and when a delay increases, the fan should move slower. Note that these two fans (red and blue) can have a completely independent movement of each other.

My tutorial contains Java Programs, Applet and HTML

If you have more questions, please contact me via email

I will help you any time

Thank you !

Attached Files

Move over [ preview ] file name to preview content in it!

Write a review

Your Name:

Your Review: Note: HTML is not translated!

Rating: Bad           Good

Enter the code in the box below:

2 Tutorials 10%
3 Tutorials 13%
4 Tutorials 16%
5 Tutorials 19%
6 Tutorials 22%
7 Tutorials 25%
8 Tutorials 28%
9 Tutorials 31%
10 Tutorials 34%
add url more