From 4142c879191d8bd65d4dcda9ddfc643e892cd966 Mon Sep 17 00:00:00 2001 From: Jeff Wallace Date: Thu, 31 Oct 2013 14:21:16 -0400 Subject: [PATCH] Fixed issue with column resizing when only one column. --- .../autopsy/corecomponents/DataResultViewerTable.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index f7a0caf935..5b59f12812 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -343,10 +343,11 @@ public class DataResultViewerTable extends AbstractDataResultViewer { //int scrollWidth = ttv.getWidth(); int margin = 4; int startColumn = 1; - if (props.size() > 0) { - ov.getOutline().setAutoResizeMode(JTable.AUTO_RESIZE_OFF); - } - + + // If there is only one column (which was removed from props above) + // Just let the table resize itself. + ov.getOutline().setAutoResizeMode((props.size() > 0) ? JTable.AUTO_RESIZE_OFF : JTable.AUTO_RESIZE_ALL_COLUMNS); + // get first 100 rows values for the table