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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started