Java Reference
In-Depth Information
Stage {
title : "Stage Style"
width: 300
height: 200
scene: Scene {
content: [
Rectangle {
x: 100 y: 50
width: 100 height: 100
arcWidth: 10
arcHeight : 10
fill: Color.RED
Text {
content: "Stage\nStyle"
x:110 y:60
fill: Color.WHITE
font:Font {size: 16}
onClose: function():Void {
Alert.inform("You are about to quit the application.");
The given code produces an application within a window with transparent border, as shown in
the next image:
How it works...
The style property of the Stage allows you to control the look of the window's border. The
code in the recipe sets the style to TRANSPARENT . The transparent style removes all lines
around the window's edge. This produces an application window with no controls and a zero
pixel-width border around the window, as shown in the previous image.
Though the effect produced by this style is nice, there is, however, no
way for the user to grab, move, or close the window. You must explicitly
provide window controls yourself when you style the stage.
Search WWH ::

Custom Search