sing JAVA, Create a File Menu in your GUI Add a file menu to your BulbGUI with options to open any file for reading (and displaying the file as in Project 2), 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 E
Using JAVA, Create a File Menu in your GUI Add a file menu to your BulbGUI with options to open any file for reading (and displaying the file as in Project 2), 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 an exception called IllegalBulbException (by extending IlegalArgumentException as shown in the lecture) and have the constructor of the Bulb throw it. For our purposes, a Bulb is illegal if the wattage is less than 5. Use a try/catch statement to catch this exception in your program, and display the erroneous Bulbs to the console (do not put them in the ArrayList). Use ArrayLists Use an ArrayList to store the unsorted Bulbs. For this project, display only the unsorted bulbs in the GUI. Input file Phillips,1237DF2,100,1200 Phillips,546AHH7,75,900 Phillips,875RTM6,4,750 Cree,14573,65,800 Cree,86545,100,1100 G.E.,AR1562,75,910 G.E.,AR6014,100,1000 G.E.,AR5497,5,720 Phillips,6539HS7,200,1700 Cree,89245,40,530 G.E.,AR7826,3,810 G.E.,AR6014,100,1000 G.E.,AR5497,60,720 Phillips,6539HS7,2,1700 Cree,89245,40,530 G.E.,AR7826,65,810
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images