@@ -179,7 +179,13 @@ public void addEntry(String name) {
179179
180180 labelMap .put (name , new TwoLabelsContainer (nameLabel , valueLabel ));
181181 }
182-
182+
183+ public void fixGroupsHeight () {
184+ for (Component component : getComponents ()) {
185+ component .setMaximumSize (new Dimension (component .getMaximumSize ().width , component .getPreferredSize ().height ));
186+ }
187+ }
188+
183189 public void removeEntry (String name ) {
184190 TwoLabelsContainer labelContainer = labelMap .get (name );
185191 assert labelContainer != null : "labelContainer for '" + name + "' is null -> was it registered?" ;
@@ -233,8 +239,10 @@ public MemoryTab() {
233239
234240 addEntry (LocalisationHelper .getString ("data_panel_memory_promotion_avg" ));
235241 addEntry (LocalisationHelper .getString ("data_panel_memory_promotion_total" ));
236- }
237-
242+
243+ fixGroupsHeight ();
244+ }
245+
238246 public void setModel (GCModel model ) {
239247 boolean fullGcDataAvailable = model .getFootprintAfterFullGC ().getN () != 0 ;
240248 boolean fullGcSlopeDataAvailable = model .getFootprintAfterFullGC ().getN () > 1 ;
@@ -377,8 +385,10 @@ public PauseTab() {
377385 addEntry (LocalisationHelper .getString ("data_panel_count_gc_pauses" ));
378386 addEntry (LocalisationHelper .getString ("data_panel_avg_gcpause" ));
379387 addEntry (LocalisationHelper .getString ("data_panel_min_max_gc_pause" ));
388+
389+ fixGroupsHeight ();
380390 }
381-
391+
382392 public void setModel (GCModel model ) {
383393 boolean pauseDataAvailable = model .getPause ().getN () > 0 ;
384394 boolean gcDataAvailable = model .getGCPause ().getN () > 0 ;
@@ -469,8 +479,10 @@ public SummaryTab() {
469479 addEntry (LocalisationHelper .getString ("data_panel_performance_fullgc" ));
470480 addEntry (LocalisationHelper .getString ("data_panel_count_gc_pauses" ));
471481 addEntry (LocalisationHelper .getString ("data_panel_performance_gc" ));
482+
483+ fixGroupsHeight ();
472484 }
473-
485+
474486 public void setModel (GCModel model ) {
475487 boolean fullGcDataAvailable = model .getFootprintAfterFullGC ().getN () > 0 ;
476488 boolean postConcurrentUsedSizeAvailable = model .getPostConcurrentCycleHeapUsedSizes ().getN () > 0 ;
0 commit comments