Threesuns

Email

Contact

All Semesters

Semesters

All Courses

Courses

Introduction to Java Programming

CSCI2133

3 credits

Labs

Scrolling Marquee

Lab

100 points

Requirements

Comments placed in each source code file.5
Files put into JAR format (needs to be executable)5
Application source and class files included.5
JAR file executes application correctly10
Program compiles and executes without errors5
Program layout is reasonably similar to example20
Marquee runs on its own thread30
GUI functions properly20
Total100 pts

Objective

To use Multithreading and Exception handling in a Java application

Instructions

Part 1:

Create a GUI component that will display a moving text marquee. The component should store a text message that it will scroll from right to left at variable speeds with variable colors. The component should run on its own thread separate from the main thread. The class should contain the following public methods in addition to any other methods that may be needed:
  • At least one Constructor
  • setMessage - sets message to be scrolled
  • getMessage - gets message to be scrolled
  • setSpeed - sets the scroll speed
  • getSpeed - gets the scroll speed
  • start - starts the scrolling
  • stop - stops the scrolling

Part 2:

Create a Java application that uses the Marquee component

When the program is executed it will display a marquee component along with other components that will allow the marquee to be controlled. The application should contain a JTextField to allow the user to enter a message to be displayed on the marquee component, a JSlider to allow the scroll speed to be changed, a start button to start the scrolling of the message and a stop button to stop it, and two JComboBox components to allow the user to select the background color and the text color from a list of the thirteen default colors in the Java.awt.Color class.

Get Java!

The program should catch any possible exceptions that might occur.