リビジョン fc1525d3
| learn/kotlin/javafx/MessageBoard/src/MessageBoard.kt | ||
|---|---|---|
|
import javafx.application.Application
|
||
|
import javafx.scene.Group
|
||
|
import javafx.scene.Scene
|
||
|
import javafx.scene.text.Text
|
||
|
import javafx.stage.Stage
|
||
|
|
||
|
class MessageBoard : Application() {
|
||
|
override fun start(primaryStage: Stage?) {
|
||
|
val message = Text("Hello, world. This is JavaFX from Kotlin.")
|
||
|
val group = Group(message)
|
||
|
group.layoutY = 50.0
|
||
|
val scene = Scene(group, 320.0, 160.0)
|
||
|
primaryStage?.scene = scene
|
||
|
primaryStage?.show()
|
||
|
}
|
||
|
}
|
||
テキストの表示