I'm doing a small program with Java GUI
here is mu code:

```
    // DebugFourteen3
// User selects pizza topping and sees price
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;

//use correct spelling of class name
public class DebugFourteen3 extends JFrame
{ 
   FlowLayout flow = new FlowLayout();
   JComboBox pizzaBox = new JComboBox();
   JLabel toppingList = new JLabel("Topping List");
   JLabel aLabel = new JLabel("Paulos's American Pie");
   JTextField totPrice = new JTextField(10);
   int[] pizzaPrice = {7,10,10,8,8,8,8};
   int totalPrice = 0;
   String output;
   int pizzaNum;
   public DebugFourteen3()
   {
      super("Pizza List");
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      setLayout(flow);
      add(toppingList);
      pizzaBox.addItem("cheese");
      pizzaBox.addItem("sausage");
      pizzaBox.addItem("pepperoni");
      pizzaBox.addItem("onion");
      pizzaBox.addItem("green pepper");
      pizzaBox.addItem("green olive");
      pizzaBox.addItem("black olive");
      add(pizzaBox);
      add(aLabel);
      add(totPrice);
      itemStateChanged(this);
   }

   public static void main(String[] arguments)
   {
      JFrame frame = new DebugFourteen3();
      frame.setSize(200, 150);
      frame.setVisible(true);
   }

   public void itemStateChanged(ItemEvent[] list)
   {
      Object source = list.getSource();
      if(source == pizzaBox)
      {
         int pizzaNum = pizzaBox.getSelectedIndex();
         totalPrice = pizzaPrice[pizzaNum];
         output = "Pizza Price $" + totalPrice;
         totPrice.setText(output);
      }
   }
}

```

the compiler gets me error on line 35, it says itemStateChanged() should receive a argument which type is ItemEvent[] but I'm passing "this"(the class it self)

can anyone explain how the itemStateChanged works with the JComboBox?
thanks