//<applet code=Textpane width=300 height=400>
//</applet>
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import javaThink.*;
public class Textpane extends JApplet{
JButton button=new JButton("Addtext");
JTextPane textpane=new JTextPane();
/*........................................*/
static Generator sg=new Arrays2.RandstringGenerator(7);
public void init(){
button.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e){
for(int i=1;i<10;i++)
textpane.setText(textpane.getText()+sg.next()
+"\n");
}
});
Container cp=getContentPane();
cp.add(new JScrollPane(textpane));
cp.add(BorderLayout.SOUTH,button);
}
public static void main(String[] args){
Console.run(new Textpane(),300,400);
}
}