Question: Write a program that has a JMenubar with a File menu. The File menu has two menu items: Load and Save. Clicking the Load item

Write a program that has a JMenubar with a File menu. The File menu has two menu items: Load and Save. Clicking the Load item should bring up a filechooser that will let the user select a file to load. The contents of the file should be added to a listmodel object, where each line from the file is a separate item. The items should then be displayed on screen in a JList.

The user should be able to select items from the JList. The selected items should be added to an ArrayList, which then can be saved into a file. When the Save item is clicked, a filechooser should open and allow the user to choose a location where to save a file containing the selected items.

You need to use BufferedReader and BufferedWriter. Use the file Books.txt for as your input file.. I could not upload the file called Books, so I am attiching it below please save it on ur machine.

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 Databases Questions!