Java语句延时
Java语句延时
import java.awt.*
import java.awt.event.*
class ddd extends Frame //implements ActionListener
{
TextArea text
ddd()
{
setLayout(new FlowLayout())
text=new TextArea(12,22)
add(text)
setBounds(12,12,200,100)
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent q)
{
System.exit(0)
}
})
setVisible(true)
validate()
pack()
for(int i=0i<=100i )
{
text.append("" i " " "
")
try
{
Thread.sleep(100)
}
catch(InterruptedException e)
{
}
}
}
}
public class klkl
{
public static void main(String args[])
{
new ddd()
}
}