Design a single form interface for a company that sells popcorntins. Your job is to create a popcorn order based on user input, soyou will need a supporting class to create the popcorn object. Yourform should not handle any other information about the order(customer, total order, other food items, etc.). Following are theattributes of the tins that the company sells. Your supportingclass should reflect these in the class fields. You may useenumerated types if you are familiar with them, but it is notrequired. Feel free to constrain user input with combo boxes. size:1, 2, and 3 gallon sizes color: red, green, or blue flavor: plain,cheese, caramel mixed: two flavors can be mixed, if desired price:the price of the item gift: whether or not the tin is a giftgiftMessage: message to paint on the tin You do not need to includeany images in your form, unless you want to. Feel free to getcreative with your form, as long as the following elements areincluded to create the popcorn tin object. NOTE: your form needs tocreate only one object. comboBox – for size,color, and flavorradioButton – for mixed and gift options labels – to identify allcontrols textField – to enter gift message, if needed button – oneto create popcornTin object, one to clear the form return focus tofirst component textArea – to display the object as created withuser choices. earning a 100 will successfully run, and create anddisplay the popcorn object in the text Area. …………… thisis what I have so far and I can’t get it to work proper.

package assignment1_spring;

/**
*
* @author A
*/import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Assignment1_Spring extends Frame {
public Assignment1_Spring(){
super(“Assignment1_Spring”);
getContentPane().setLayout(new FlowLayout());
  
String[] colortext = new String[] {“Red”,”Green”,”Blue”};
String[] sizetext = new String[] {“1 Gallon”,”2 Gallon”, “3Gallon”};
String[] flavortext = new String[] {“Plain”,”Cheese”,”Carmel”};
  
Label size = new Label(“Size:”);
Label color = new Label(“Color:”);
Label flavor = new Label(“Flavor:”);
Label mixed = new Label(“Mixed:”);
Label price = new Label(“Price:”);
Label gift = new Label(“Gift:”);
Label giftMessage = new Label(“Gift Message:”);
  
JComboBox CSize = new JComboBox<>(sizetext);
JComboBox CColor = new JComboBox<>(colortext);
JComboBox CFlavor = new JComboBox<>(flavortext);
  
TextField textField1 = new TextField(“”,5);
TextField textField2 = new TextField(“”,15);
  
JRadioButton opt1 = new JRadioButton(“Yes”);
JRadioButton opt2 = new JRadioButton(“No”);
JRadioButton opt3 = new JRadioButton(“Yes”);
JRadioButton opt4 = new JRadioButton(“No”);
  
final Button create = new Button(“Create”);
Button clear = new Button(“Clear”);
  
ButtonGroup group1 = new ButtonGroup();
group1.add(opt1);
group1.add(opt2);
  
ButtonGroup group2 = new ButtonGroup();
group1.add(opt3);
group2.add(opt4);
  
getContentPane().add(BorderLayout.SOUTH, size);
getContentPane().add(CSize);
getContentPane().add(CColor);
getContentPane().add(color);
getContentPane().add(CColor);
getContentPane().add(flavor);
getContentPane().add(CFlavor);
getContentPane().add(mixed);
getContentPane().add(opt1);
getContentPane().add(opt2);
  
getContentPane().add(price);
getContentPane().add(textField1);
getContentPane().add(gift);
getContentPane().add(opt3);
getContentPane().add(opt4);
getContentPane().add(giftMessage);
getContentPane().add(textField2);
  
getContentPane() .add(create);
getContentPane() .add(clear);
  
create .addActionListener(new ActionListener(){
public void actionPerformed (ActionEvent evt)
{
Object src = evt.getSource();
if(src == create)
{
TextArea obj = new TextArea(“Object has been created”);
getContentPane().add(obj);
}
} });
setSize(400, 600);
setVisible(true);
}   
public static void main(String[] args) {
// TODO code application logic here
}
}