static void makeFakeSingleComponentPanel(JPanel panel, Component c) { panel.setLayout(new BorderLayout); panel.removeAll(); panel.add(c); panel.revalidate(); }