JComponent () { ensureUiInitialized(); if (myOptionsComponent == null){ myOptionsComponent = createOptionsPanel(); final JComponent component = createTopRightComponent(); if (component == null) { myTopRightPanel.setVisible(false); } else { myTopRightPanel.add(component, BorderLayout.CENTER); } } if (myOptionsComponent != null) { myOptionsPanel.add(myOptionsComponent, BorderLayout.CENTER); } else { Logger.getInstance(getClass().getName()).error("Options component is null for " + getClass()); } updateName(); return myWholePanel; }