Question : Converting application to applet

I'm trying to convert a TCP Client to an Applet and I'm stuck at this part of code:

1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
    public static void main(String[] args) {

	// The default port

	int port_number=2222;
        String host="localhost";

	if (args.length < 2)
	    {
		System.out.println("Usage: java Client  \n"+
				   "Now using host="+host+", port_number="+port_number);
	    } else {
		host=args[0];
		port_number=Integer.valueOf(args[1]).intValue();
	    }


So... this whole args[] thing... how do I convert that to an applet?

Answer : Converting application to applet

You can see below a shot of a truncated client applet connecting to your existing server. Note the Java Console trace and the use of param tags:

Random Solutions  
 
programming4us programming4us