In this lab, you will begin developing a Media Player that will have the following functionality:
We will begin with the basics. Specifically in this lab, you will design and implement the Graphical User Interfaces for the Media Player application. This includes the main Media Player GUI as well as a GUI for the Playlist Manager. You'll build upon these GUI's in subsequent lab assignments. In the end, you will have a working Media Player similar to (but better!) applications like the Microsoft Media Player, Apple iTunes, or Winamp.
Shown below are a couple of examples of Media Player/Playlist Manager GUI's created by past students, illustrating both basic and fairly advanced designs. Be creative, but don't go overboard - the student who created the second design spent a month of his summer vacation totally rewriting his initial program in order to accomplish the result shown. Both versions are fully functional.
MediaPlayerUI and PlaylistManagerUI Create a third main class called MediaPlayerApp that, in it's main method, creates an instance of each GUI class.MediaPlayerUI and PlaylistManagerUI should contain only a single method each - their respective constructors. Place all code for creating the respective GUI's inside these constructors. Declare all variables used to refer to UI components (JButton, JProgressBar, etc) as private data attributes of respective the GUI class.
The image below is an example (which you need not follow) of a BorderLayout manager used on the JFrame of the MediaPlayerUI with the fields of the BorderLayout indicated in dark red.
JPanel contains a FlowLayout to position the Playlist Manager and Open Playlist JButtons.JPanel contains another FlowLayout to position the Play, Stop, Prev, and Next JButtons.JPanel contains a JProgressBar (that indicates the progress in and two JLabel elements (that list the currently loaded playlist and currently playing audio track), all of which are absolutely positioned within the JPanel.MediaPlayerUI window must not be resizeable.JFrame title bar of the Media Player window.JFrame title bar should contain the text ”<your name>'s SE1020 Media Player”.
For the PlaylistManagerUI the example below uses a BorderLayout.
JLabel component.JTextArea component.JPanel contains a FlowLayout that positions the Add, Remove, Save, and Cancel JButton.PlaylistManagerUI window must be resizeable; all the GUI components must remain in the same relative location and size regardless of how the user resizes the window.JFrame title bar of the PlaylistManagerUI window. That is, the window should remain visible on the screen (along with the MediaPlayerUI window). Only the MediaPlayerUI is allowed to close the program.JFrame title bar should contain the text “Playlist Manager”.Even when using layout managers, you will still have to experiment by trial and error to achieve a reasonable sizing of the various controls within the windows (remember, part of your grade will be based on the appearance of your GUI). Review the documentation for the various layout managers for use in positioning the components appropriately (alignment and sizing), and review the setPreferredSize() and setMinimumSize() methods to specify sizes of the components you place within the layout.
If you fulfill all requirements stated in the previous section, you will receive a maximum grade of 90 on this lab. For the extra 10 points, complete the following additional requirements:
JButton, and determine how to place something other than text on a button. Hint: Look at the JButton methods that contain the word “icon” in the method name. Here are some files containing images you can use in this and future labs. Incorporate these images into the buttons of the MediaPlayer GUI so that the end result is as shown below. You need different images to indicate the various states of the button - all needed images are included in the file you download through the link above.MediaPlayerUI to the one that looks like a hand pointing it's index finger. Use the default cursor for the PlaylistManagerUIMediaPlayerUI and PlaylistManagerUI to be something other than the default icon.You should indicate how much time (in minutes) you spend on this assignment in the FAST database. You are encouraged to log your activity as you work on the project. At a minimum, you should log all of the time spent on this assignment before the due date given above. All time spent on this assignment should be entered into the week 2 column (even if you worked on it in week 3).
Follow your instructor's directions for your lab report.
If you have any questions, consult your instructor.