Create a movie with a filled rectangle moving diagonally from the top right of the picture to the bottom left.
What will be an ideal response?
```
/? ?
? Method t o make a movie t h a t has a r e c t a n g l e moving
? from t o p r i g h t t o bottom l e f t
? @param d i r e c t o r y t h e d i r e c t o r y t o p u t t h e movie
? frames
?/
public void makeRectMovieTopRightToBotLeft ( S t r i n g d i r e c t o r y )
{
int framesPerSec = 3 0 ;
P i c t u r e p = null ;
G r a p h i c s g = null ;
FrameSequencer f r a m e S e q u e n c e r =
new FrameSequencer ( d i r e c t o r y ) ;
f r a m e S e q u e n c e r . setShown ( true ) ;
// l o o p t h r o u g h t h e f i r s t s e c o n d
f o r ( i n t i = 0 ; i < f r a m e s P e r S e c ; i ++)
{
// draw a f i l l e d r e c t a n g l e
p = new P i c t u r e ( 6 4 0 , 4 8 0 ) ;
g = p . getGraphics ( ) ;
g . s e t C o l o r ( C o l o r .RED) ;
g . f i l l R e c t (590 ? ( i ? 10) , i ? 10 , 5 0 , 5 0 ) ;
// add frame t o s e q u e n c e r
f r a m e S e q u e n c e r . addFrame ( p ) ;
}
// p l a y t h e movie
frameSequencer . play ( framesPerSec ) ;
}
```
You might also like to view...
Java is case sensitive. What does that mean?
What will be an ideal response?
To add a row to the bottom of a table, place the insertion point in the last cell and tap the __________ key.
Fill in the blank(s) with the appropriate word(s).
At a restaurant, you overhear people discussing an interesting case they treated while working in a dental office that day. Which type of regulated data policies are most likely to have been violated?
a. PII b. PHI c. PCI d. GDPR
What is the implementation of the ADT dictionary which has efficiency O(1) for addition?
a. sorted link-based b. sorted array-based c. binary search tree d. unsorted link-based