public static void linkPreferredHeight(
            final Component reference, Component... companions) {
        for (final Component companion : companions) {
            companion.addComponentListener(new ComponentAdapter() {
                @Override
                public void componentResized(ComponentEvent e) {
                    int refHeight = reference.getPreferredSize().height;
                    Dimension comSize = companion.getPreferredSize();
                    if (comSize.height != refHeight) {
                        comSize.height = refHeight;
                        companion.setPreferredSize(comSize);
                    }
                }
            });
        }
    }