If you reload this page, or return to it after going back to the index page (alternatively using the browser's <- button), you will find that the 'hello, world' greeting is not always printed; in certain cases, a java.lang.IllegalThreadStateException is thrown.
The source code is as follows:
package com.lafros
import javax.swing.JApplet
import scala.actors.Actor.actor
class ActorsApplet extends JApplet {
println("new instance created")
override def init() {
println("init()")
actor {
println("hello, world")
}
}
override def start() = println("start()")
override def stop() = println("stop()")
override def destroy() = println("destroy()")
}