applet source codesourceIcon (in a .java source file).
(Here's the corresponding
1.0 source codesourceIcon (in a .java source file).)
The client has been changed not only
to communicate with the host the applet came from,
but also to have a graphical UI,
and to have a loop
so that it can get as many quotes as you like.
You can run the applet by including it in a page
with the following HTML code:
<APPLET CODE=QuoteClientApplet.class =500 =100
</APPLET
Here's a link to a example-1dot1/quoteApplet>page that contains the above HTML code. By saving this page to a file on your local HTTP server, you can use it to communicate with the server-side application that will be running on the HTTP server. You must also save the compiled form of the applet to the same directory.
Before the applet can get quotes, you need to run the server on the host that the applet came from. You then need to note the number of the port that the server is listening on. After you enter this port number into the applet, it will hook up with the server and you'll be able to get one-line quotations. Below are detailed instructions, followed by pictures of the server and the applet in action.
QuoteServer.javasourceIcon (in a .java source file)
and
QuoteServerThread.javasourceIcon (in a .java source file).
Here's a text file
(example-1dot1/one-liners.txt>one-liners.txt)
that should be in the same directory
as the resulting class files.
QuoteServer class.
For example, if you view the applet's page
with the URL http://mymachine/quoteApplet,
then you need to run the server on the host named
mymachine.
Bhopal news
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100