Create the following GUI: The GUI consists of three JLists: two that contain the
ID: 3535161 • Letter: C
Question
Create the following GUI: The GUI consists of three JLists: two that contain the numbers 0 – 9, and one that contains three operations ( +, - and * ). The GUI should also contain a JButton with the label “Calculate†and a JTextField. Each JList should also be contained in a JScrollPane. The window shown is separated into two JPanels – the top one contains the three JScrollPanes in a GridLayout, and the bottom one contains the “Calculate†button and the JTextField in a BorderLayout. You may space and size all the components as you like. Set each JList to SINGLE_SELECTION. Also, add an ActionListener to the “Calculate†button. When the button is pressed, it should retrieve the values from the three lists and display the calculated value in the JTextField (e.g. if “1â€, “+†and “2†are selected in the lists, then the JTextField should display “1 + 2 = 3â€). When the user clicks the “Calculate†button, the program ensures that the user selected a value from each list. If not, the program should display a message telling the user that an item must be selected from each list.Create the following GUI: The GUI consists of three JLists: two that contain the numbers 0 – 9, and one that contains three operations ( +, - and * ). The GUI should also contain a JButton with the label “Calculate†and a JTextField. Each JList should also be contained in a JScrollPane. The window shown is separated into two JPanels – the top one contains the three JScrollPanes in a GridLayout, and the bottom one contains the “Calculate†button and the JTextField in a BorderLayout. You may space and size all the components as you like. Set each JList to SINGLE_SELECTION. Also, add an ActionListener to the “Calculate†button. When the button is pressed, it should retrieve the values from the three lists and display the calculated value in the JTextField (e.g. if “1â€, “+†and “2†are selected in the lists, then the JTextField should display “1 + 2 = 3â€). When the user clicks the “Calculate†button, the program ensures that the user selected a value from each list. If not, the program should display a message telling the user that an item must be selected from each list.
Explanation / Answer
please i want the points for urgent help me
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.