public void setupMenu() {

        menuBar = new JMenuBar();
        menu = new JMenu("Menu");
        menuBar.add(menu);

        fileLogin = new JMenuItem("Enter Nickname");
        menu.add(fileLogin);

        fileLogin.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                LoginClient login = new LoginClient(frame);
                login.setVisible(true);

                //Gets the username from the login form.
                if (login.getUsername().length() != 0) {
                    username = login.getUsername();

                }

                append("Welcome online " + username + "!" + "\n");
            }
        });

        menu.addSeparator();

        connect = new JMenuItem("Connect");
        menu.add(connect);

        connect.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {

                ConnectDialog dialog = new ConnectDialog(frame);
                dialog.setVisible(true);

                if ((dialog.getServername().length() != 0) && (dialog.getPort().length() != 0)) {

                    portField = dialog.getPort();
                    serverField = dialog.getServername();

                }

                append("Server set to: " + dialog.getServername() + "\n");

            }
        });

        menu.addSeparator();
        options = new JMenuItem("Options");
        menu.add(options);
        exit = new JMenuItem("Exit");
        menu.add(exit);

        exit.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {

                System.exit(1);

            }
        });

        help = new JMenu("Help");
        menuBar.add(help);
        contact = new JMenuItem("Contact Admin");
        help.add(contact);
        helpTopic = new JMenuItem("Help Topics");
        help.add(helpTopic);
        setJMenuBar(menuBar);

    }