try this
Send = new Button("Send");
add(Send,BorderLayout.WEST);
--------------------------------------------------------------------------------
// Modifed
import java.awt.*;
import java.applet.*;
import java.util.*;
import java.awt.event.*;
/*
<applet code = "MessageWindow" width=400 height = 200>
</applet>
*/
public class MessageWindow extends applet implements ActionListener
{
Button Send;
TextArea A1,A2;
public void init()
{
setBackground(Color.cyan);
setLayout(new BorderLayout());
add(new TextArea(" ",10,30),BorderLayout.NORTH);
add(new TextArea(" ",5,30),BorderLayout.SOUTH);
// I put this
Send = new Button("Send");
//I change dis:)
add(Send,BorderLayout.WEST);
Send.addActionListener(this);
}
public void actionPerformed(ActionEvent ae)
{
String str = ae.getActionCommand();
if(str.equals("Send"))
{
repaint();
}
else
{
repaint();
};
}
}