- 280 名前:デフォルトの名無しさん mailto:sage [2010/04/24(土) 04:25:14 ]
- >>270
import swing._ def point = (util.Random.nextDouble -> util.Random.nextDouble) def data = Stream.continually(point).take(1000).toList new Frame { contents = new BorderPanel { preferredSize = new Dimension(300, 300) def scale(d: Double) = (d * 300).toInt override def paintComponent(g:Graphics2D) { data.foreach(p => g.fillRect(scale(p._1), scale(p._2), 1, 1)) } } visible = true }
|

|