public static void main(String[] args) {
        
        final String host; 
        final int port;
        
        if(args.length == 2) {
            
            host = args[0];

            try {
                port = Integer.parseInt(args[1]);
            } catch (NumberFormatException e) {
                System.err.println("Port number error: " + args[1]);
                return;
            }
        } else {
            System.err.println("Incorrect arguments count (" + args.length + ").");
            return;
        }
    
        SwingUtilities.invokeLater(new Runnable() {
            public void run() {
                try {
                    new ClientFrame(host, port);
                } catch(Exception e) {
                    e.printStackTrace();
                }
            }
        });

    }