import java.awt.*;
import javax.swing.*;
/**
 * class that is use to store movie information
 * 
 * @author Thomas 
 * @version 1.00
 */
public class MovieInfo extends JComponent{
    
    //declare private variables
    private String movieName;
    private String director;
    private String yearMade;
    private Image moviePic;
    
    public MovieInfo(String m, String d, String year, Image ic ){ //constructor
        
        movieName = m;
        director = d;
        yearMade = year;
        moviePic = ic;
    
    }
    
    public void paintComponent( Graphics g ){
        
        super.paintComponent(g);
        
        int height = this.getHeight();
        int width = this.getWidth(); 
        
        Color custom = new Color( 181, 227, 255 ); //background color
        g.setColor( custom );

        g.fillRect( 0, 0, width-5, height-5 );
        
        g.setColor( Color.BLACK );

        Font big = new Font ( "SansSerif", Font.BOLD, 20); //font for movie title
        g.setFont( big );
       
        g.drawString( movieName, 260, 150 ); //movie title
        
        Font small = new Font( "Serif", Font.PLAIN, 20); //font for director and release year
        g.setFont( small );
        
        g.drawString( director, 260, 200 ); //director
        g.drawString( yearMade, 260, 250 ); // release year
        
        g.drawImage( moviePic, 10, 10, 235, 350, this); 
        
        
        
    }

        


}


