Tyler's Java Website

Movie List

This application had several requirements:

  • Write a class that extends the JComponent class that keeps track of information for a movie.
  • Maintain instance variables for the title, director, year released, and an image.
  • Write your own paintComponent method in this class that draws the image and then displays the variables.
  • In your applet class, instantiate several Movie objects for different movies and add each to your applet.

The Code

The main thing that was standing in my way was trying to figure out how my JApplet class was supposed to interact with my JComponent class. I also struggled with trying to decide how I was going to store and display my information. I thought about using a list or an array, but I didn't do that. It was easiest to just insert the information into my JScrollPane instead. I think there is room for improvement. It could certianly look prettier.