/** * Initialize the GUI components and layout for this component. */ private void init() { // WARNING: called from ctor so must not be overridden (i.e. must be private or final) // Standalone if (displayName) { setLayout(new BorderLayout(0, 5)); setBorder(makeBorder()); add(makeTitlePanel(), BorderLayout.NORTH); JPanel mainPanel = new JPanel(new BorderLayout()); mainPanel.add(createCriticalSectionPanel(), BorderLayout.NORTH); add(mainPanel, BorderLayout.CENTER); } else { // Embedded setLayout(new BorderLayout()); add(createCriticalSectionPanel(), BorderLayout.NORTH); } }