Question: Please code in Java Create File Menu in your GUI Add a file menu to your WordGUI with options to open any file for reading,

Please code in Java

Create File Menu in your GUI

Add a file menu to your WordGUI with options to open any file for reading, and one to Quit the program. You will need a FileMenuHandler class to handle the events from the FileMenu. Be sure to use getAbsolutePath() when getting the file from the JFileChooser, not getName().

Handle Exceptions

Create exception called IllegalWordException (by extending IlegalArgumentException) and have the constructor of the Word throw it. Use a try/catch statement to catch this exception in your program, and show the erroneous Words in the GUI as usual.

Use ArrayLists

Use an ArrayList to store the unsorted, sorted and erroneous words. You can use the Collections.sort() method to sort the ArrayList rather than selection sort.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!