have you ever have this kind of display..when running an applet ?

java-sc.png

while the code is just like this..

Socket s = null;
try {
s = new Socket(getCodeBase().getHost(),Integer.parseInt(p.getProperty(“image.1.port”)));
// changed the status.. to state that we’re connected?
status.setText(“Connected to:” + getCodeBase().getHost() + “:” + p.getProperty(“image.1.port”));
OutputStream slout = s.getOutputStream();
BufferedWriter bw = new BufferedWriter(
new OutputStreamWriter(slout));
bw.write(“GET ” + imageURL2 + ” HTTP/1.0 \r\n\n”);
status.setText(“Written : ” + imageURL2 + “to socket.”);
//close it
BufferedReader br = new BufferedReader(
new InputStreamReader(s.getInputStream()));

System.out.println(br.readLine());

bw.close();
s.close();
} catch (IOException e)
{
//e.printStacktrace();
}