Question: In Java create a Gui that uses a combo box to select an orange, cheesecake, and a full sandwhich. Use JLabels and JTextField objects to
In Java create a Gui that uses a combo box to select an orange, cheesecake, and a full sandwhich. Use JLabels and JTextField objects to ask them for measurements so a radius for an orange, a base and height for a cheesecake a side length for a squre. Using the paint Component, add a JButton to draw each shape when the user clicks "Draw an Orange", "Draw a full sandwhich", "Draw a cheesecake". The orange should be orange, the cheesecake should be green, the full sandwhich should be blue. Label above the orange what the user inputted as the radius, Label the calculated area of the circle below. Label on the sides of the sandwhich what the user put as the side length, calculate the area of the sandwhich above. Label on the sides of the cheesecake what the user put as the base and height, calculate the area of the sandwhich below. Only the questions relevant to the selection should be displayed. For example, when you click orange, the user is prompted only for the radius and given the JButton "Draw an Orange".
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
