Package ua.vydai.chat.client.view.interfaces

Examples of ua.vydai.chat.client.view.interfaces.ClientView.showError()


                model.submitMessage(msg);
            }
        } else if (event.getActionCommand().equals(ClientView.ACTION_CONNECT)) {
            String username = view.getUsername().trim();
            if (username.length() == 0) {
                view.showError("Username can't be empty");
                return;
            }
            String host = view.getHost().trim();
            int port;
            try {
View Full Code Here


            String host = view.getHost().trim();
            int port;
            try {
                port = Integer.parseInt(view.getPort());
            } catch (NumberFormatException e) {
                view.showError("Port should contain only digits");
                return;
            }
            if (port < 1024 || port > 65536) {
                view.showError("Port must be between 1024 and 65536");
                return;
View Full Code Here

            } catch (NumberFormatException e) {
                view.showError("Port should contain only digits");
                return;
            }
            if (port < 1024 || port > 65536) {
                view.showError("Port must be between 1024 and 65536");
                return;
            }
            model.connect(username, host, port);
        } else if (event.getActionCommand().equals(ClientView.ACTION_DISCONNECT)) {
            model.disconnect();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.