import javafx.ui.*; import javafx.ui.canvas.*; import fx.DigitalClock; var dc = new DigitalClock(); var c = Group {content: [ Rect { transform: [ translate(10, 10) ] width: 100 height: 100 stroke: new Color(0, 0, 0, 255) strokeWidth: 1.0 fill: new Color(123, 123, 255, 255) }, Circle { cx: 100 cy: 100 radius: 60 stroke: new Color(16, 128, 16, 255) strokeWidth: 1.0 fill: new Color(0, 255, 0, 255) }, Group { transform: [ translate(120, 10) ] content: [ Path { d: [ MoveTo {x: 0, y: 0}, LineTo {x: 100, y: 0}, LineTo {x: 100, y: 15}, LineTo {x: 0, y: 15}, LineTo {x: 0, y: 0}, ClosePath ] stroke: new Color(0, 0, 0, 255) strokeWidth: 1.0 }, Text { x: 3 y: 3 content: "日本語文字列" font: new Font("MS ゴシック", "PLAIN", 12) fill: new Color(0, 0, 0, 255) } ] }, View { transform: [ translate(120, 35) ] size: {width: 100, height: 150} content: Button { text: "Button" font: new Font("Arial", "PLAIN", 11) } }, ]}; Frame { title: "ComponentTest" width: 250 height: 260 centerOnScreen: true content: BorderPanel { top: dc center: Canvas {content: c} } onClose: operation() { dc.running = false; } visible: true };