This is a simple example showing "Hello World" centered on a fullscreen frame Preview SDK version package javafxapplication1; import javafx.ui.*; import javafx.ui.canvas.*; import javafx.ui.filter.*; import java.awt.Toolkit; Frame { var s = Toolkit.getDefaultToolkit().getScreenSize() title: "Hello" undecorated: true background: Color.WHITE width: s.width height: s.height content: Canvas { var text:Text content: text = Text { x: (s.width / 2) - (text.currentWidth / 2) y: (s.height / 2) - (text.currentHeight / 2) content: "Hello World! {s.width} x {s.height}" font: Font { face: FontFace.VERDANA, style: [ FontStyle.ITALIC, FontStyle.BOLD], size: 60 } } } visible: true }
Attributes | Values |
---|---|
rdfs:label |
|
rdfs:comment |
|
dcterms:subject | |
abstract |
|