public DedicatedUIImpl(
            Frame parentFrame,
            DedicatedModel model,
            boolean deliverEnabled) {
        super(parentFrame, model.getTitle(), false);

        fParentFrame = parentFrame;
        fModel = model;
        fModel.addPropertyChangeListener(event -> {
            setTitle(fModel.getTitle());
            if (fMenuItem != null) {
                fMenuItem.setLabel(fModel.getTitle());
            }
        });

        fRecipientHintsPopup = new PopupMenu(StringDefs.RECIPIENT);
        fActivated = false;
        //
        // Register as WindowListener
        //
        addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent event) {
                setVisible(false);
            }
        });
        //
        // Window Layouts
        //
        GridBagLayout gridBag = new GridBagLayout();
        GridBagConstraints constraints = new GridBagConstraints();
        setBackground(Color.lightGray);
        setLayout(gridBag);

        fActionListener = event -> {
            Object target = event.getSource();

            if (target == fDeliverButton) {
                fModel.deliver(fModel.getSenderName() + ", " + fToList.getText(), fInputArea, this);
            } else if (target == fClearLogButton) {
                fLogArea.clear();
            } else if (target instanceof MenuItem) {
                MenuItem item = (MenuItem) target;
                String menuLabel = item.getLabel();
                String expandedHint = fRecipientHintsDB.getExpandedRecipients(menuLabel);

                Util.recipientHintSelected(expandedHint, fToList, fShiftKeyAdapter.isShiftKeyPressed());
            }
        };
        //
        // Deliver Button
        //
        fDeliverButton = new Button(StringDefs.DELIVER);
        fDeliverButton.addActionListener(fActionListener);
        fDeliverButton.setEnabled(deliverEnabled);
        fCursorControl.addCursorComponent(fDeliverButton);
        fCursorControl.addEnablableComponent(fDeliverButton);
        fFontManager.addComponent(fDeliverButton);

        constraints.fill = GridBagConstraints.NONE;
        constraints.anchor = GridBagConstraints.WEST;
        constraints.gridwidth = 1;
        constraints.weightx = 0.0;
        constraints.weighty = 0.0;
        constraints.insets.top = 2;
        constraints.insets.left = 2;
        constraints.insets.bottom = 2;
        constraints.insets.right = 2; // (2, 2, 2, 2)
        gridBag.setConstraints(fDeliverButton, constraints);
        add(fDeliverButton);
        //
        // To List
        //
        fToLabel = new Label(StringDefs.ADDITIONAL_TO_C);
        fCursorControl.addCursorComponent(fToLabel);
        fCursorControl.addEnablableComponent(fToLabel);
        fFontManager.addComponent(fToLabel);

        constraints.insets.left = 0;
        constraints.insets.right = 0; // (2, 0, 2, 0)
        gridBag.setConstraints(fToLabel, constraints);

        add(fToLabel);
        fToLabel.addMouseListener(new PopupMenuAdapter(fToLabel, fRecipientHintsPopup));
        updateRecipientHintsPopup();

        fToList = new XTextField(1 /* Context.kWindowWidth - 24 */);
        fBGColorManager.add(fToList);
        fCursorControl.addCursorComponent(fToList);
        fCursorControl.addEnablableComponent(fToList);
        fFontManager.addComponent(fToList);

        fToList.addKeyListener(fShiftKeyAdapter);
        constraints.fill = GridBagConstraints.HORIZONTAL;
        constraints.weightx = 1.0;
        constraints.insets.right = 2; // (2, 0, 2, 2)
        gridBag.setConstraints(fToList, constraints);
        add(fToList);

        //
        // Clear Log Button
        //
        fClearLogButton = new Button(StringDefs.CLEAR_LOG);
        fClearLogButton.addActionListener(fActionListener);
        fCursorControl.addCursorComponent(fClearLogButton);
        fCursorControl.addEnablableComponent(fClearLogButton);
        fFontManager.addComponent(fClearLogButton);

        constraints.gridwidth = GridBagConstraints.REMAINDER;
        constraints.fill = GridBagConstraints.NONE;
        constraints.anchor = GridBagConstraints.EAST;
        constraints.weightx = 0.0;
        gridBag.setConstraints(fClearLogButton, constraints);
        add(fClearLogButton);

        //
        // Input area
        //
        fInputArea = new InputTextArea(5, Context.WINDOW_WIDTH, TextArea.SCROLLBARS_VERTICAL_ONLY);
        fBGColorManager.add(fInputArea);
        fInputArea.addKeyListener(new KeyAdapter() {
            @Override
            public void keyPressed(KeyEvent keyEvent) {
                int keyCode = keyEvent.getKeyCode();
                if (KeyUtil.isDeliverKey(keyCode)) {
                    fModel.deliver(fModel.getSenderName() + ", " + fToList.getText(), fInputArea, DedicatedUIImpl.this);
                }
            }
        });
        fCursorControl.addCursorComponent(fInputArea);
        fCursorControl.addEnablableComponent(fInputArea);
        fFontManager.addComponent(fInputArea);

        constraints.fill = GridBagConstraints.BOTH;
        constraints.anchor = GridBagConstraints.WEST;
        constraints.weightx = 1.0;
        constraints.weighty = 1.0;
        constraints.insets.top = 0;
        constraints.insets.left = 0;
        constraints.insets.bottom = 0;
        constraints.insets.right = 0;
        gridBag.setConstraints(fInputArea, constraints);
        add(fInputArea);
        //
        // Log Area
        //
        TextArea logTextArea = new TextArea("", 15, Context.WINDOW_WIDTH, TextArea.SCROLLBARS_VERTICAL_ONLY);
        fBGColorManager.add(logTextArea);
        fCursorControl.addCursorComponent(logTextArea);
        logTextArea.setEditable(false);
        fFontManager.addComponent(logTextArea);

        gridBag.setConstraints(logTextArea, constraints);
        add(logTextArea);

        Dimension size = fPropertiesDB.getSize(fModel.getSenderIP());
        if (size != null) {
            setSize(size);
        } else {
            pack();
        }

        fFontManager.addContainer(this);

        Point location = fPropertiesDB.getLocation(fModel.getSenderIP());
        if (location != null) {
            setLocation(location);
            fPreserveZeroLocation = true;
        }
        fCursorControl.addCursorComponent(this);

        fLogArea = new LogAreaImpl(fParentFrame, logTextArea);
    }