Use a GUI to open the file for displaying the Roman numerals. Then modify your Roman Numeral GUI so that it will be a complete JFrame with a menu bar and menus.

Programming

Use a GUI to open the file for displaying the Roman numerals. Modify your Roman Numeral GUI so that it will be a complete JFrame with a menu bar and menus.

You will need a handler for the File menu, and another handler for the Convert menu. As mentioned in lecture, be sure when opening a file with the file menu handler that your ask for the absolute path to the file rather than just its file name (getAbsolutePath() rather than getName()).

Create an exception for illegal Roman numerals

Create a class called Illegal Roman Numeral Exception that extends Illegal Argument Exception as shown in lecture.

This exception should be thrown by the constructor of a Roman Numeral if there is an invalid the console, not placed in the GUI. This exception may be thrown when constructing a Roman numeral read from the file, or when trying to convert from Roman to Arabic.

Use a GUI to open the file for displaying the Roman numerals. Then modify your Roman Numeral GUI so that it will be a complete JFrame with a menu bar and menus.
Scroll to top