import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTextArea;
public class Test {
public static void main(String args[]) {
JFrame frame = new JFrame();
frame.setLayout(new FlowLayout(FlowLayout.LEFT));
final JTextArea textArea1 = new JTextArea(20, 30);
final JTextArea textArea2 = new JTextArea(20, 30);
JButton button = new JButton("=>");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
textArea2.setText(textArea1.getText());
}
});
frame.add(textArea1);
frame.add(button);
frame.add(textArea2);
frame.pack();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
}
}