void (Component component) { if (mySettingComponent == null) { mySettingComponent = new JPanel(); mySettingComponent.setOpaque(false); mySettingComponent.setLayout(new BoxLayout(mySettingComponent, BoxLayout.X_AXIS)); add(mySettingComponent, BorderLayout.WEST); } mySettingComponent.add(component); }