Static nested class drop down list using AWT Panel
<p>disclaimer, this is a homework exercise I'm stuck on. Please point me in the right direction.</p>

<p>I'm having trouble with my nested class. I basically have to create a nested static class that generates a drop down list via java.AWT Panel. </p>

<p>Here is the code: (slight update to my code...still confused tho')</p>

<pre><code>package ui.panels;
</code></pre>

<p>import interfaces.Resettable;
import java.awt.Choice;
import java.awt.Color;
import java.awt.Component;
import java.awt.GridLayout;
import java.awt.Panel;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import shapes.Shape;
import model.Model;</p>

<p>public class MainPanel extends Panel implements Resettable{
    ActionPanel actionPanel;
    ControlsPanel controlsPanel;
    private ColorPanel colorPanel;</p>

<pre><code>private void init() {
    colorPanel = new ColorPanel();
}

public MainPanel(Model model) {
    actionPanel = new ActionPanel(model);
    controlsPanel = new ControlsPanel(model);

    setLayout(new GridLayout(2,1));
    add(controlsPanel);
    add(actionPanel);

}

 public void resetComponents() {
     controlsPanel.resetComponents();
     actionPanel.resetComponents();
 }

 public static class ColorPanel {

   public final static String BLACK = "Black";
   public final static String BLUE = "Blue";
   public final static String GREEN = "Green";
   public final static String RED = "Red";
   public final static String YELLOW = "Yellow";
   public final static String Magenta = "Magenta";

   private static String[] color_selections = {"Black","Blue","Green","Red","Yellow","Magenta"};
   String msg = "";

      // now create list panel
      public ColorPanel(){
        Choice myChoice = new Choice();

        for (String msg : color_selections) {
          myChoice.add(msg);
        }
        myChoice.addItemListener(new ItemListener() {
          public void itemStateChanged(ItemEvent e) {

            //do something here when item is selected

          }
      });
        this.add(myChoice); //here is my problem. I don't know what this should say
      }

 }
</code></pre>

<p>}</p>
