Index: trunk/src/scriptbuilder/structures/SimulationScript.java
===================================================================
--- trunk/src/scriptbuilder/structures/SimulationScript.java	(revision 169)
+++ trunk/src/scriptbuilder/structures/SimulationScript.java	(revision 182)
@@ -33,20 +33,15 @@
 
     /**
-     * All default options for GUI colorings of incidents.
-     */
-    public static final Color[] incidentColors =
-    {
-        Color.BLACK,
-        Color.BLUE,
-        Color.RED,
-        new Color(0x38, 0x5E, 0x0F),
-        new Color(128, 0, 128),
-        Color.MAGENTA,
-        new Color(0x23, 0x6B, 0x8E),
-        Color.ORANGE,
-        new Color(0x60, 0x33, 0x11),
-        Color.GRAY
-    };
-
+     * Strings to show in the incident color combo box.  Last item should be black,
+     * which will be used if invalid color is provided to lookupColor().
+     */
+    public static final String[] colorNames = {"BLUE", "RED", "CYAN", "GREEN", 
+        "ORANGE", "MAGENTA", "YELLOW", "BLACK"};
+    /** 
+     * Allowed color choices for incident display. 
+     * These colors must match the items in colorNames.
+     */
+    public static final Color[] incidentColors = {Color.BLUE, Color.RED, Color.CYAN, 
+        Color.GREEN, Color.ORANGE, Color.MAGENTA, Color.YELLOW, Color.BLACK};
     /**
      * The file to which this script will be saved.
@@ -428,4 +423,24 @@
         return count;
     }
-
+    
+    /** Given a color, find its index in the incidentColors.
+     * @param color a java color 
+     * @return the index of color in incidentColors, or last index if color isn't 
+     * in incidentColors.  The last item in incidentColors should be black.
+     */
+    public static int lookupColor(Color color)
+    {
+        int idx = 0;
+        // search color array for target
+        while(idx < incidentColors.length && !incidentColors[idx].equals(color))
+        { 
+            idx++;
+        }
+        // if color not found, return index of last item.
+        if (idx == incidentColors.length) 
+        {
+            return idx-1;
+        }
+        else return idx;
+    }
 }
Index: trunk/src/scriptbuilder/structures/MyScriptHandler.java
===================================================================
--- trunk/src/scriptbuilder/structures/MyScriptHandler.java	(revision 170)
+++ trunk/src/scriptbuilder/structures/MyScriptHandler.java	(revision 182)
@@ -749,5 +749,7 @@
             else if (currentElement == ELEMENT.COLOR)
             {
-                currInc.color = incColor;
+                // Validate that the color read is actually a legal color
+                // then assign it to the incident
+                currInc.color = SimulationScript.incidentColors[SimulationScript.lookupColor(incColor)];
             }
             else if (currentElement == ELEMENT.EXPECTED_ACTION)
@@ -906,7 +908,9 @@
                 if (incidentMap.get(incidentLogNumber) == null)
                 {
+                    // Select a random color to display for this incident
+                    // Will be overriden if a color tag is provided.
                     Color newColor = SimulationScript.incidentColors[Math.abs(new Random().nextInt())
                             % SimulationScript.incidentColors.length];
-
+                    
                     incidentMap.put(incidentLogNumber,
                             new ScriptIncident(newColor,
Index: trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java
===================================================================
--- trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java	(revision 179)
+++ trunk/src/scriptbuilder/gui/ScriptBuilderFrame.java	(revision 182)
@@ -84,14 +84,5 @@
      */
     private Color selectedColor;
-     /**
-     * Strings to show in the incident color combo box
-     */
-    private final String[] colorModel = {"BLUE", "RED", "CYAN", "GREEN", 
-        "ORANGE", "MAGENTA", "YELLOW", "BLACK"};
-    /** 
-     * Allowed color choices. These colors must match the items in the combobox.
-     */
-    private final Color[] colorChoices = {Color.BLUE, Color.RED, Color.CYAN, 
-        Color.GREEN, Color.ORANGE, Color.MAGENTA, Color.YELLOW, Color.BLACK};
+
     /**
      * Get the script currently in use.
@@ -712,5 +703,5 @@
         jLabel2.setText("Incident Type:");
 
-        colorComboBox.setModel(new DefaultComboBoxModel(colorModel));
+        colorComboBox.setModel(new DefaultComboBoxModel(SimulationScript.colorNames));
         colorComboBox.addActionListener(new java.awt.event.ActionListener() {
             public void actionPerformed(java.awt.event.ActionEvent evt) {
@@ -1348,10 +1339,10 @@
 
         scriptBuilderMenuBar.addAncestorListener(new javax.swing.event.AncestorListener() {
+            public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
+            }
             public void ancestorAdded(javax.swing.event.AncestorEvent evt) {
                 scriptBuilderMenuBarAncestorAdded(evt);
             }
             public void ancestorRemoved(javax.swing.event.AncestorEvent evt) {
-            }
-            public void ancestorMoved(javax.swing.event.AncestorEvent evt) {
             }
         });
@@ -1631,5 +1622,5 @@
 
     /**
-     * Executed when the "OK" button is pressed on the Incident editor. If
+     * Executed when the "OK" button is pressed on the Incident properties window. If
      * incident is new, and is valid, adds it to the model and updates. If
      * editing existing incident, verifies changes are valid and applies them.
@@ -1813,6 +1804,6 @@
         addIncidentStart.setValue(0);
         txtIncidentLength.setText("0");
-        selectedColor = colorChoices[0];
-        incidentColorField.setBackground(colorChoices[0]);
+        selectedColor = SimulationScript.incidentColors[0];
+        incidentColorField.setBackground(selectedColor);
         colorComboBox.setSelectedIndex(0);
         addIncidentDescription.setText("");
@@ -1960,5 +1951,5 @@
         //addIncidentLength.setValue(i.length / 60);
         incidentColorField.setBackground(i.color);
-        colorComboBox.setSelectedIndex(lookupColor(i.color));
+        colorComboBox.setSelectedIndex(SimulationScript.lookupColor(i.color));
         selectedColor = i.color;
         addIncidentDescription.setText(i.description);
@@ -2362,5 +2353,4 @@
 
     private void incidentDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_incidentDetailsActionPerformed
-        // TODO add your handling code here:
         Object[] incidentList = script.incidents.toArray();
         ScriptIncident i = (ScriptIncident) JOptionPane.showInputDialog(
@@ -2387,5 +2377,5 @@
             //addIncidentLength.setValue(i.length / 60);
             incidentColorField.setBackground(i.color);
-            colorComboBox.setSelectedIndex(lookupColor(i.color));
+            colorComboBox.setSelectedIndex(SimulationScript.lookupColor(i.color));
             selectedColor = i.color;
             addIncidentDescription.setText(i.description);
@@ -2444,20 +2434,8 @@
         // Save the chosen color
         int index = colorComboBox.getSelectedIndex();
-        selectedColor = colorChoices[index];
+        selectedColor = SimulationScript.incidentColors[index];
         incidentColorField.setBackground(selectedColor);
     }//GEN-LAST:event_colorSelectedHandler
-    /** Given a color, find its index in the color Choices.
-     * @param color a java color 
-     * @pre color exists in color choices
-     */
-    private int lookupColor(Color color)
-    {
-        int idx = 0;
-        while(idx < colorChoices.length && colorChoices[idx] != color)
-        { 
-            idx++;
-        }
-        return idx;
-    }
+
 
     /**
@@ -2505,4 +2483,6 @@
         {
             UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
+            //UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
+            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
         }
         catch (Exception ex)
Index: trunk/src/scriptbuilder/gui/ScriptBuilderFrame.form
===================================================================
--- trunk/src/scriptbuilder/gui/ScriptBuilderFrame.form	(revision 177)
+++ trunk/src/scriptbuilder/gui/ScriptBuilderFrame.form	(revision 182)
@@ -479,5 +479,5 @@
           <Properties>
             <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
-              <Connection code="new DefaultComboBoxModel(colorModel)" type="code"/>
+              <Connection code="new DefaultComboBoxModel(SimulationScript.colorNames)" type="code"/>
             </Property>
           </Properties>
