public void actionPerformed(ActionEvent ee){
        JButton e = (JButton)ee.getSource();
        if (e.equals(l) && !username.getText().equals("")){
            try{
                c = new Chat(host, port);
                c.startupLogIn(username.getText(), password.getText());
                frame.setVisible(false);
            }catch(Exception ex){}
        }
        else if (e.equals(r) && !username.getText().equals("")){
            try{
                String pass = JOptionPane.showInputDialog("please re-enter your password");
                if (pass.equals(password.getText())){
                    c = new Chat(host, port);
                    c.startupRegister(username.getText(), password.getText());
                    frame.setVisible(false);
                }
            }catch(Exception ex){}
        }
        else if (e.equals(o)){
            new ipconfig();
            host = ipconfig.popup();
            port=ipconfig.port();
        }
    }