Hi, somehow I don't see it happening in my pc. The JTextArea is automatically scrolled to the button without me having to set the JScrollBar at all (might be due to different JDK version... I am using 1.4). You can try out this program to see if it works or not. Just type in any words into the JTextField and press enter. The word will be automatically appended to the JTextArea.
// JSPDemo.java
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JSPDemo extends JFrame implements KeyListener
{
JTextArea tarea;
JScrollPane jsp;
JTextField tField;
public JSPDemo()
{
getContentPane().setLayout(null);
setSize(210,260);
tarea = new JTextArea();
jsp = new JScrollPane(tarea);
jsp.setBounds(new Rectangle(0,0,200,200));
tField = new JTextField();
tField.setBounds(new Rectangle(0,205,200,20));
tField.addKeyListener(this);
getContentPane().add(jsp,null);
getContentPane().add(tField,null);
}
public void keyPressed(KeyEvent e)
{
if (e.getKeyCode() == 10)
{
tarea.append(tField.getText()+"\n"

;
tField.setText(""

;
}
}
public void keyReleased(KeyEvent e)
{
}
public void keyTyped(KeyEvent e)
{
}
public static void main(String[] args)
{
JSPDemo d = new JSPDemo();
d.show();
}
}