a tu jest fragment kodu Client.java
import java.awt.*;
import java.applet.*;
import java.net.*;
import java.io.*;
import java.lang.*;
public class Client extends Applet implements Runnable
{
protected DataInputStream input;
protected DataOutputStream output;
protected Socket Sock;
protected String host;
protected int port;
protected String userName;
protected boolean firstTime; //flaga, czy to pierwsza wiadomosc
java.awt.TextArea txtChatPane; //deklaracja komponentow interfejsu
uzyt.
java.awt.TextField txtInput;
protected Thread listener;
public void init() {
setLayout(null);
setSize(320,196);
//tu jest blad(?)txtChatPane.setText("Wpisz swoj NICKNAME i wcisnij
Enter");
txtChatPane.setBounds(2,1,304,154);
add(txtChatPane);
txtInput.requestFocus(); //parametry z appletu
this.host = this.getParameter("host");
this.port = Integer.parseInt(this.getParameter("port"));
firstTime = true;
userName = "New User";
txtInput.setText(userName);
listener = new Thread (this);
}
poradzcie cos :)
pozdr
guit
Nie tworzysz elementu "txtChatPane", np.
txtChatPane= new TextArea();
podobnie z pozostałymi elementami awt
--
Artur