This is a two-week assignment with a milestone due after the first week.
In this lab, you will extend your Media Player to incorporate the following functionality:
Shown below is a screenshot of the Media Player.
In this lab, you will continue the work you began on the Media Player in lab 2. In particular, you will add functionality to the various UI components. The following UML Class Diagram illustrates the basic structure of your program after making the modifications required for this lab:
Modify your existing MediaPlayerUI class to incorporate a menu bar containing both an Options menu and a Help menu. Within the Options menu:

PlaylistMangerUI class named setBackgroundColor that you must write. Within this method, use the color values to set the background color of the Playlist Manager's JTextArea. The normal sequence of calls for the preceding instructions is represented by the following UML Sequence Diagram: 
Repeat the preceding steps, but modified for the Text color event. Respond to this event by setting the text (foreground) color of the Playlist Manager's JTextArea via a call to a method of PlaylistManagerUI named setTextColor that you must write.
Note that 255,255,255 specifies the color white. The resulting Playlist Manager UI looks like this:
Implement the Help menu:
ActionListener to handle the About menu item event.JOptionPane-based message dialog that displays “SE1020 Media Player Application by <your name>”, as shown below (on two lines). Note the text in the title bar, as well as the “i” icon. Reproduce this appearance. 
Implement functionality that automatically loads user-defined preferences for window positions, text color, and background colors. To do this, create a class called UserPreferences that will be used to store, load, and save user-defined preferences. The UserPreferences class:
MediaPlayerUI constructor to create an instance of the UserPreferences class. The default constructor for the UserPreferences class must initialize every attribute with reasonable values. MediaPlayerUI constructor, call a UserPreferences method named loadPreferences (that you must write) that tries to load an existing mp_prefs.txt file containing the attributes that were saved last time the program was exited. Scanner class to help read in the values. Set the value of each attribute of the UserPreferences object equal to the value read from the file.loadPreferences method returns. MediaPlayerUI constructor, use the Accessor methods of the UserPreferences class to retrieve the values of all the attributes, and use the retrieved values to set the various windows' properties. Note: In order to set the PlaylistMangerUIs window position and size, you'll have to implement a public method on that class called setPosition that accepts the x,y location as well as the width and height as method parameters.
The startup sequence for the Media Player application is graphically described by this UML Sequence Diagram:
After starting the Media Player, the user may reposition the windows, resize the Playlist Manager window, or use the menus to change background and text colors. Upon application exit, you'll save these parameters as UserPreferences attributes as follows:
WindowListener (or, alternately, <i>extend</i> WindowAdapter) to handle this event (via the windowClosing method).UserPreferences class named savePreferences (that you must write) that creates a file called mp_prefs.txt and saves all the private attributes:savePreferences method.The application shutdown sequence is illustrated by the following UML Sequence Diagram:
During the first week of this two week assignment, you must complete implementation of the Options and Help menu functionality as described above.
During the lab of week 6, you will demonstrate the features you implemented during the first week. Use the following steps to test your implementation:
JTextArea. When you press OK, the colors should immediately change.During the second week of this two week assignment, you must complete the Load/Save User Preferences functionality described above. You will demonstrate this during the lab session of week 7 (during the Lab 6 session). Use the following steps to test your implementation:
mp_prefs.txt file exists, delete it from your directory.JTextArea.JTextArea, as in the week 6 milestone.mp_prefs.txt should exist in your directory. The file should contain four records as described in step 5 above.mp_prefs.txt file should be loaded. The locations of the windows should be placed according to their last saved values, and the color of the Playlist Manager's JTextArea should be according to the saved valud as well.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. Enter all time spent prior to the Week 6 demonstration in the week 5 column and all time spent prior to the Week 7 demonstration in the week 6 column.