Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You dont need to write the code, you just fix the incorrect behavior Please Briefly describe the incorrect behaviors produced by this code and how
You dont need to write the code, you just fix the incorrect behavior Please Briefly describe the incorrect behaviors produced by this code and how to correct the code (Hint: there are 4 issues with this code.) Identify any needed change (sO by line number identify any needed addition(s) by stating where you would add new code (after which line Numbers) You do not necessarily need to write any code to answer this question you can answer by giving a clear description of the issue(s). 1. GUI Isses (15 points The oode on the nesr page prodaces a GUI which looks correct, but does not behave correctly (Import statements and comments have been removed to keep the code short.) (The code compiles with no erors and runs with no exceptions (This question is about code functionality, NOT about warnings from tools Briefy describe the (Hint: there are 4 issues with this code) Identify any needed change(s) by line number. ldentify any needed addition(s) by stating where you would add incorrect behaviors) produced by this code and how to correct the code. new code (after which line number). clear You do not necessarily need to write any code to answer this question; you can answer by giving a publio final olass MenuAndToolBarFrane ( 2 3 private final JPanel myPanel / nrivate final atccolorAation> myColorAationa OcaRon) by stating where you would add n answer by giving a clear You do not necessarily need to write any code to answer this question; you can publie final elass MenuAndToolBarFrame ( 2 3 private final JPanel nyPanel private final LiatccolorAotion> nycolorAotionaz 5 publio MenuAndToo1BarFrame 0 final JTrane frano = nose Jrrane(); RyPanel-new JPane102 RyPanel.setBackground (Color, RED) frane add (myPanel) z 7 10 myColorAction8 new ArrayList() myColorActions . add (new ColorAction ("Red". Color. RED) ) mycolorAotions add (now ColorAotion ("Blue", Color BLATE) F 12 13 24 15 16 17 2 6 29 20 frane. add (oreateHenuBar ). BorderLayout. NORTH) / trame.add (oreateToolBar, Borderlayout. SoUTH) z frane.et8iz (300, 300) trane.setvinible(truo) frame add (oren teMenuBarO,BorderLayout. NORTn2 . add (araa toToolBar (); BorderLayout . SOTM) , frane.018 (300, 300) PEAVAte TooiBr orenteTooinar rinal ButtonGroup btngrP ButtonGroupO EAnai Toggiebutton bennew Sregglepucton car 17 18 20 frane. 0evisible (true); private JToolBar eresteToo1Baro final ButtonGroup bengrp new ButtonGroup 2 Please Briefly describe the incorrect behaviors produced by this code and how to correct the code (Hint: there are 4 issues with this code.) Identify any needed change (sO by line number identify any needed addition(s) by stating where you would add new code (after which line Numbers) You do not necessarily need to write any code to answer this question you can answer by giving a clear description of the issue(s). 1. GUI Isses (15 points The oode on the nesr page prodaces a GUI which looks correct, but does not behave correctly (Import statements and comments have been removed to keep the code short.) (The code compiles with no erors and runs with no exceptions (This question is about code functionality, NOT about warnings from tools Briefy describe the (Hint: there are 4 issues with this code) Identify any needed change(s) by line number. ldentify any needed addition(s) by stating where you would add incorrect behaviors) produced by this code and how to correct the code. new code (after which line number). clear You do not necessarily need to write any code to answer this question; you can answer by giving a publio final olass MenuAndToolBarFrane ( 2 3 private final JPanel myPanel / nrivate final atccolorAation> myColorAationa OcaRon) by stating where you would add n answer by giving a clear You do not necessarily need to write any code to answer this question; you can publie final elass MenuAndToolBarFrame ( 2 3 private final JPanel nyPanel private final LiatccolorAotion> nycolorAotionaz 5 publio MenuAndToo1BarFrame 0 final JTrane frano = nose Jrrane(); RyPanel-new JPane102 RyPanel.setBackground (Color, RED) frane add (myPanel) z 7 10 myColorAction8 new ArrayList() myColorActions . add (new ColorAction ("Red". Color. RED) ) mycolorAotions add (now ColorAotion ("Blue", Color BLATE) F 12 13 24 15 16 17 2 6 29 20 frane. add (oreateHenuBar ). BorderLayout. NORTH) / trame.add (oreateToolBar, Borderlayout. SoUTH) z frane.et8iz (300, 300) trane.setvinible(truo) frame add (oren teMenuBarO,BorderLayout. NORTn2 . add (araa toToolBar (); BorderLayout . SOTM) , frane.018 (300, 300) PEAVAte TooiBr orenteTooinar rinal ButtonGroup btngrP ButtonGroupO EAnai Toggiebutton bennew Sregglepucton car 17 18 20 frane. 0evisible (true); private JToolBar eresteToo1Baro final ButtonGroup bengrp new ButtonGroup 2
You dont need to write the code, you just fix the incorrect behavior
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