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