MessageFrame will extend JFrame. Its constructor will take four parameters. The first three are integers. The first two represent the width and height of the frame. The third parameter is a font size. The last parameter is a Color. The frame should be made visible when it is instantiated.
The MessageFrame class will have a single public method called setMessage that takes a single String parameter. This sets a message to be displayed in the frame. If no message is set or the message set is null, no message is displayed.
The title of the frame will be Message Frame. The background of the frame will be white and the color of the message is given by the 4th parameter of the constructor. You may use any font you like to display the message, but it should be easily readable. The message should be displayed close to the lower left corner of the frame. Do not worry too much about the exact placement of the message or whether the entire message will fit in the frame. The frame will be resizable.
The setMessage method should allow the message to be changed at any time.
You may create additional classes if they are needed by MessageFrame.
The MessageTest application will be in its own file and will create two copies of MessageFrame. The first will have width 500, height 100, font size 50 and the red message should be This is a test. The second one will have width 900, height 150, font size 100 and the green message should be This is only a test. The MessageTest class should control the placement of the the two frames so they do not overlap.
After 5 seconds, the message in the first frame should be changed to This is done.
Remember, you can get as much help as you like on this assignment, but you must document this both in your log book and in an email to the cs4773 account which is due at midnight on the due date.
You might want to look at Example 7-6 in the first Core Java book.
Turning in your assignment:
Assignments will be turned in electronically as follows: