Create a movie with text in a ticker tape moving up from the bottom of the picture to the top.
What will be an ideal response?
```
/**
* Method to c r e a t e a t i c k e r t a p e movie t h a t moves
* from bot tom to top
* @param d i r e c t o r y the d i r e c t o r y to wr i t e to
* @param message the s t r i n g to d i s p l a y
*/
public void makeTickerTapeMovieBotTop ( St r ing di r e c t o r y ,
St r ing message )
{
int f ramesPerSec = 3 0 ;
Pi c tur e p = nul l ;
Graphics g = nul l ;
FrameSequencer f rameSequencer =
new FrameSequencer ( d i r e c t o r y ) ;
Font f ont = new Font ( "Ar i a l " , Font .BOLD, 2 4 ) ;
// loop f o r 2 seconds of animat ion
for ( int i = 0 ; i < f ramesPerSec * 2 ; i++)
{
// draw the s t r i n g
p = new Pi c tur e ( 3 0 0 , 2 0 0 ) ;
g = p . ge tGraphi c s ( ) ;
g . s e tCo l o r ( Color .BLACK) ;
g . setFont ( f ont ) ;
g . drawSt r ing (message , 1 0 , 190 ยก ( i * 2 ) ) ;
// add frame to s e quenc e r
f rameSequencer . addFrame (p ) ;
}
// p lay the movie
f rameSequencer . play ( f ramesPerSec ) ;
}
```
You might also like to view...
Which of the following best characterizes areas in the OSPF protocol?
A) Not used B) Used to combine small networks into one large network C) An inefficient use of bandwidth D) Used to partition a large network into small networks
A Windows image is a compressed file in .wim format used to duplicate a Windows installation
Indicate whether the statement is true or false