Home Segments Top Top Previous Next

898: Mainline

Using the definition of the Marquee class shown in Segment 897, you can write the following variation on the program defined in Segment 896:

import javax.swing.*; 
import java.awt.event.*; 
import java.util.*; 
public class MovieApplicationWithThread extends MovieApplication { 
 // Declare variables 
 private Marquee marquee; 
 // Define constructor 
 public MovieApplicationWithThread () { 
  super(); 
  marquee = new Marquee("Buy On To Java Today!"); 
  getContentPane().add("South", marquee);                
 } 
}