From e8f73ecea60bd3ce3a23c7f04b74f3d61880b058 Mon Sep 17 00:00:00 2001
From: Alex Ebadirad <aebadirad@42six.com>
Date: Wed, 21 Mar 2012 15:07:46 -0700
Subject: [PATCH] Bug fix to the stack overflow issue

Signed-off-by: Alex Ebadirad <aebadirad@42six.com>
---
 Report/src/org/sleuthkit/autopsy/report/reportFilter.form  | 7 +++++--
 Report/src/org/sleuthkit/autopsy/report/reportFilter.java  | 5 +++--
 .../org/sleuthkit/autopsy/report/reportPanelAction.java    | 4 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Report/src/org/sleuthkit/autopsy/report/reportFilter.form b/Report/src/org/sleuthkit/autopsy/report/reportFilter.form
index 8c3a8123f9..d6a44ab924 100644
--- a/Report/src/org/sleuthkit/autopsy/report/reportFilter.form
+++ b/Report/src/org/sleuthkit/autopsy/report/reportFilter.form
@@ -81,11 +81,11 @@
               <Component id="jCheckBox3" min="-2" max="-2" attributes="0"/>
               <EmptySpace type="separate" max="-2" attributes="0"/>
               <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="progBar" pref="23" max="32767" attributes="1"/>
-                  <Group type="103" alignment="0" groupAlignment="3" attributes="0">
+                  <Group type="103" groupAlignment="3" attributes="0">
                       <Component id="jButton1" alignment="3" max="32767" attributes="1"/>
                       <Component id="cancelButton" alignment="3" max="32767" attributes="1"/>
                   </Group>
+                  <Component id="progBar" min="-2" max="-2" attributes="1"/>
               </Group>
               <EmptySpace max="-2" attributes="0"/>
           </Group>
@@ -154,6 +154,9 @@
       <Properties>
         <Property name="enabled" type="boolean" value="false"/>
         <Property name="name" type="java.lang.String" value="" noResource="true"/>
+        <Property name="preferredSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor">
+          <Dimension value="[146, 23]"/>
+        </Property>
       </Properties>
     </Component>
     <Component class="javax.swing.JButton" name="cancelButton">
diff --git a/Report/src/org/sleuthkit/autopsy/report/reportFilter.java b/Report/src/org/sleuthkit/autopsy/report/reportFilter.java
index f3404291f0..0af6be7cbb 100644
--- a/Report/src/org/sleuthkit/autopsy/report/reportFilter.java
+++ b/Report/src/org/sleuthkit/autopsy/report/reportFilter.java
@@ -91,6 +91,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
 
         progBar.setEnabled(false);
         progBar.setName(""); // NOI18N
+        progBar.setPreferredSize(new java.awt.Dimension(146, 23));
 
         cancelButton.setText(org.openide.util.NbBundle.getMessage(reportFilter.class, "reportFilter.cancelButton.text")); // NOI18N
         cancelButton.setActionCommand(org.openide.util.NbBundle.getMessage(reportFilter.class, "reportFilter.cancelButton.actionCommand")); // NOI18N
@@ -144,10 +145,10 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
                 .addComponent(jCheckBox3)
                 .addGap(18, 18, 18)
                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(progBar, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                     .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                         .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                        .addComponent(cancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
+                        .addComponent(cancelButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                    .addComponent(progBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                 .addContainerGap())
         );
     }// </editor-fold>//GEN-END:initComponents
diff --git a/Report/src/org/sleuthkit/autopsy/report/reportPanelAction.java b/Report/src/org/sleuthkit/autopsy/report/reportPanelAction.java
index 9d3dc3f8c5..44bfac8e3a 100644
--- a/Report/src/org/sleuthkit/autopsy/report/reportPanelAction.java
+++ b/Report/src/org/sleuthkit/autopsy/report/reportPanelAction.java
@@ -96,9 +96,9 @@ public void actionPerformed(ActionEvent e) {
                         });
             // add the panel to the popup window
             popUpWindow.add(panel);
-            popUpWindow.pack();
+            
             popUpWindow.setResizable(true);
-        
+            popUpWindow.pack();
             // set the location of the popUp Window on the center of the screen
             Dimension screenDimension = Toolkit.getDefaultToolkit().getScreenSize();
             double w = popUpWindow.getSize().getWidth();
-- 
GitLab