public static void linkPreferredSize(
            final Component reference, Component... companions) {
        for (final Component companion : companions) {
            companion.addComponentListener(new ComponentAdapter() {
                @Override
                public void componentResized(ComponentEvent e) {
                    Dimension refSize = reference.getPreferredSize();
                    if (!companion.getPreferredSize().equals(refSize)) {
                        companion.setPreferredSize(refSize);
                    }
                }
            });
        }
    }