code: private void updateMenuIcon() {
          List<Image> iconList = null;
          if (rootParent instanceof JFrame) {
              iconList = ((JFrame) rootParent).getIconImages();
          } else if (rootParent instanceof JDialog) {
              iconList = ((JDialog) rootParent).getIconImages();
          }
          
          Image frameIcon = iconList != null && iconList.size() > 0 ? iconList.get(0) : null;
  
          SeaGlassContext context   = getContext(this);
  
          if (frameIcon != null) {
              Dimension maxSize   = (Dimension) context.getStyle().get(context, "InternalFrameTitlePane.maxFrameIconSize");
              int       maxWidth  = 16;
              int       maxHeight = 16;
  
              if (maxSize != null) {
                  maxWidth  = maxSize.width;
                  maxHeight = maxSize.height;
              }
              menuButton.setIcon(new ImageIcon(frameIcon.getScaledInstance(maxWidth, maxHeight, Image.SCALE_SMOOTH)));
          }
  
          context.dispose();
      }
docs: Resets the menuButton icon to match that of the frame.