private void resetPreferredSize(JComponent component) {
    component.setPreferredSize(null);
    component.setPreferredSize(myIconsPanel.getPreferredSize());
  }
private void resetPreferredSize(JComponent component)