4792 fix npe with initial empty panel

This commit is contained in:
William Schaefer 2019-04-02 15:58:06 -04:00
parent e35dd18c9a
commit 4ef9ae338f
2 changed files with 10 additions and 14 deletions

View File

@ -93,10 +93,7 @@
<Group type="103" groupAlignment="0" attributes="0">
<EmptySpace min="0" pref="7164" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="tableContainerPanel" pref="7164" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
</Group>
<Component id="tableContainerPanel" alignment="0" pref="7164" max="32767" attributes="0"/>
</Group>
</Group>
</DimensionLayout>
@ -105,8 +102,8 @@
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" alignment="0" attributes="0">
<Component id="tableContainerPanel" pref="433" max="32767" attributes="0"/>
<EmptySpace min="-2" pref="0" max="-2" attributes="0"/>
<Component id="tableContainerPanel" min="-2" pref="113" max="-2" attributes="0"/>
<EmptySpace min="0" pref="320" max="32767" attributes="0"/>
</Group>
</Group>
</Group>
@ -154,7 +151,7 @@
</Group>
<Group type="103" rootIndex="1" groupAlignment="0" attributes="0">
<Group type="102" attributes="0">
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
<EmptySpace min="0" pref="-349" max="32767" attributes="0"/>
<Component id="tablesViewerSplitPane" min="-2" max="-2" attributes="0"/>
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
</Group>

View File

@ -114,9 +114,10 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
this.tableModel = new OtherOccurrencesFilesTableModel();
this.casesTableModel = new OtherOccurrencesCasesTableModel();
this.correlationAttributes = new ArrayList<>();
this.viewerPanel.add(occurrencePanel);
initComponents();
customizeComponents();
this.viewerPanel.add(occurrencePanel);
reset();
}
@ -1039,7 +1040,7 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
.addContainerGap())
.addGroup(tableContainerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(tableContainerPanelLayout.createSequentialGroup()
.addGap(0, 0, Short.MAX_VALUE)
.addGap(javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(tablesViewerSplitPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE)))
);
@ -1050,17 +1051,15 @@ public class DataContentViewerOtherCases extends JPanel implements DataContentVi
otherCasesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 7164, Short.MAX_VALUE)
.addGroup(otherCasesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(otherCasesPanelLayout.createSequentialGroup()
.addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 7164, Short.MAX_VALUE)
.addGap(0, 0, 0)))
.addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 7164, Short.MAX_VALUE))
);
otherCasesPanelLayout.setVerticalGroup(
otherCasesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 0, Short.MAX_VALUE)
.addGroup(otherCasesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(otherCasesPanelLayout.createSequentialGroup()
.addComponent(tableContainerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 433, Short.MAX_VALUE)
.addGap(0, 0, 0)))
.addComponent(tableContainerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 320, Short.MAX_VALUE)))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);