Index: trunk/src/scriptbuilder/gui/panels/TimeStampPanel.java
===================================================================
--- trunk/src/scriptbuilder/gui/panels/TimeStampPanel.java	(revision 1)
+++ trunk/src/scriptbuilder/gui/panels/TimeStampPanel.java	(revision 54)
@@ -89,4 +89,46 @@
 
     /**
+     * Update the length interval and the dimensions of the panel. NOTE: This
+     * method implementation is an exact duplication of the update method in
+     * panels.TimelineTickPanel. I'm not sure if it actually accomplishes
+     * anything here.
+     *
+     * @param script The simulation script model
+     */
+    public void update(ScriptIncident incident)
+    {
+        longestLength = ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH;
+
+        // Get the stats on the incidents
+        int height = ScriptBuilderGuiConstants.TICK_TOP_MARGIN * 4;
+        if (incident != null)
+        {
+            height += incident.collapsed
+                    ? ScriptBuilderGuiConstants.TIMELINE_OPENED_HEIGHT
+                    : ScriptBuilderGuiConstants.TIMELINE_OPENED_HEIGHT;
+            if ((incident.length + incident.offset) > longestLength)
+            {
+                longestLength = incident.length + incident.offset;
+            }
+        }
+
+        if (incident != null && incident.number == 100)
+        {
+            incident.length = longestLength;
+            incident.offset = 0;
+        }
+
+        Dimension newSize = new Dimension(longestLength
+                / ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION
+                * ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK
+                + ScriptBuilderGuiConstants.TICK_TIMELINE_LEFT_MARGIN + 50,
+                height);
+        this.setPreferredSize(newSize);
+        this.setSize(newSize);
+
+        this.invalidate();
+    }
+
+    /**
      * Refresh the panel. Draw the timestamps for the appropriate intervals
      * based on zoom level.
Index: trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java
===================================================================
--- trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java	(revision 31)
+++ trunk/src/scriptbuilder/gui/panels/TimelineTickPanel.java	(revision 54)
@@ -7,4 +7,5 @@
 import javax.swing.JPanel;
 import javax.swing.event.MouseInputAdapter;
+import scriptbuilder.gui.IncidentEditorFrame;
 import scriptbuilder.gui.ScriptBuilderFrame;
 import scriptbuilder.gui.ScriptBuilderGuiConstants;
@@ -130,4 +131,40 @@
 
     /**
+     * Update the panel's dimensions based on number of events, zoom level, and
+     * which events are collapsed.
+     *
+     * @param script The main script model
+     */
+    public void update(ScriptIncident incident)
+    {
+        longestLength = ScriptBuilderGuiConstants.TICK_TIMELINE_SMALLEST_LENGTH;
+
+        // Get the stats on the incidents
+        int height = ScriptBuilderGuiConstants.TICK_TOP_MARGIN * 4;
+
+        if (incident != null)
+        {
+            height += incident.collapsed
+                    ? ScriptBuilderGuiConstants.TIMELINE_OPENED_HEIGHT
+                    : ScriptBuilderGuiConstants.TIMELINE_OPENED_HEIGHT;
+            if ((incident.length + incident.offset) > longestLength)
+            {
+                longestLength = incident.length + incident.offset;
+            }
+
+        }
+
+        Dimension newSize = new Dimension(longestLength
+                / ScriptBuilderGuiConstants.HORIZONTAL_TICK_RESOLUTION
+                * ScriptBuilderGuiConstants.PIXEL_WIDTH_PER_HORIZONTAL_TICK
+                + ScriptBuilderGuiConstants.TICK_TIMELINE_LEFT_MARGIN + 50,
+                height);
+        this.setPreferredSize(newSize);
+        this.setSize(newSize);
+
+        this.invalidate();
+    }
+
+    /**
      * Refresh the panel. Redraw the ticks based on zoom level, panel
      * dimensions, and offset. If the user is trying to add an event, draw that
@@ -182,10 +219,23 @@
         paintChildren(g);
 
-        if (focused
-                && ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null)
-        {
-            EventIconDrawer.DrawEventIcon(g2d,
-                    ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType,
-                    x, y);
+        if (this.getTopLevelAncestor() instanceof ScriptBuilderFrame)
+        {
+            if (focused
+                    && ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null)
+            {
+                EventIconDrawer.DrawEventIcon(g2d,
+                        ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType,
+                        x, y);
+            }
+        }
+        if (this.getTopLevelAncestor() instanceof IncidentEditorFrame)
+        {
+            if (focused
+                    && ((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType != null)
+            {
+                EventIconDrawer.DrawEventIcon(g2d,
+                        ((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType,
+                        x, y);
+            }
         }
     }
Index: trunk/src/scriptbuilder/gui/panels/ScriptBuilderTimelinePanel.java
===================================================================
--- trunk/src/scriptbuilder/gui/panels/ScriptBuilderTimelinePanel.java	(revision 53)
+++ trunk/src/scriptbuilder/gui/panels/ScriptBuilderTimelinePanel.java	(revision 54)
@@ -11,4 +11,5 @@
 import javax.swing.JPanel;
 import javax.swing.event.MouseInputAdapter;
+import scriptbuilder.gui.IncidentEditorFrame;
 import scriptbuilder.gui.ScriptBuilderFrame;
 import scriptbuilder.gui.ScriptBuilderGuiConstants;
@@ -100,5 +101,14 @@
         {
             Editor ed = new Editor();
-            ScriptBuilderFrame f = (ScriptBuilderFrame) getTopLevelAncestor();
+            ScriptBuilderFrame f = null;
+            IncidentEditorFrame g = null;
+            if (getTopLevelAncestor() instanceof ScriptBuilderFrame)
+            {
+                f = (ScriptBuilderFrame) getTopLevelAncestor();
+            }
+            else if (getTopLevelAncestor() instanceof IncidentEditorFrame)
+            {
+                g = (IncidentEditorFrame) getTopLevelAncestor();
+            }
 
             x = cursorTime = e.getX();
@@ -142,17 +152,37 @@
             if (e.getButton() == MouseEvent.BUTTON1)
             {
-                if (f.currentEventType != null)
-                {
-                    I_ScriptEvent s = ScriptEvent.factoryByType(f.currentEventType);
-                    ed.addProperty(eventTypeToPropertyMap.get(f.currentEventType), s);
-                    if (incident.slices.get(newSlice) == null)
+                if (getTopLevelAncestor() instanceof ScriptBuilderFrame)
+                {
+                    if (f.currentEventType != null)
                     {
-                        incident.addNewEvent(s, newSlice);
+                        I_ScriptEvent s = ScriptEvent.factoryByType(f.currentEventType);
+                        ed.addProperty(eventTypeToPropertyMap.get(f.currentEventType), s);
+                        if (incident.slices.get(newSlice) == null)
+                        {
+                            incident.addNewEvent(s, newSlice);
+                        }
+                        else
+                        {
+                            incident.slices.get(newSlice).addEvent(s);
+                        }
+                        f.update(f.getScript(), f.getScript());
                     }
-                    else
+                }
+                if (getTopLevelAncestor() instanceof IncidentEditorFrame)
+                {
+                    if (g.currentEventType != null)
                     {
-                        incident.slices.get(newSlice).addEvent(s);
+                        I_ScriptEvent s = ScriptEvent.factoryByType(g.currentEventType);
+                        ed.addProperty(eventTypeToPropertyMap.get(g.currentEventType), s);
+                        if (incident.slices.get(newSlice) == null)
+                        {
+                            incident.addNewEvent(s, newSlice);
+                        }
+                        else
+                        {
+                            incident.slices.get(newSlice).addEvent(s);
+                        }
+                        g.update(null, g.getIncident());
                     }
-                    f.update(f.getScript(), f.getScript());
                 }
             }
@@ -294,14 +324,33 @@
 
         Graphics2D g2d = (Graphics2D) g;
-        IncidentTimelineDrawer.DrawScriptBuilderTimeline(g2d, incident);
+        if (getTopLevelAncestor() instanceof ScriptBuilderFrame)
+        {
+            IncidentTimelineDrawer.DrawScriptBuilderTimeline(g2d, incident);
+        }
+        if (getTopLevelAncestor() instanceof IncidentEditorFrame)
+        {
+            IncidentTimelineDrawer.DrawIncidentTimeline(g2d, incident, false);
+        }
 
         if (focused)
         {
             CursorDrawer.DrawCursor(g2d, cursorTime, false);
-            if (((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null)
-            {
-                EventIconDrawer.DrawEventIcon(g2d,
-                        ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType,
-                        x + 5, y + 10);
+            if (this.getTopLevelAncestor() instanceof ScriptBuilderFrame)
+            {
+                if (((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType != null)
+                {
+                    EventIconDrawer.DrawEventIcon(g2d,
+                            ((ScriptBuilderFrame) this.getTopLevelAncestor()).currentEventType,
+                            x + 5, y + 10);
+                }
+            }
+            if (this.getTopLevelAncestor() instanceof IncidentEditorFrame)
+            {
+                if (((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType != null)
+                {
+                    EventIconDrawer.DrawEventIcon(g2d,
+                            ((IncidentEditorFrame) this.getTopLevelAncestor()).currentEventType,
+                            x + 5, y + 10);
+                }
             }
         }
