The app Yin-Yang is a little JavaFX & Maven desktop application which demonstrate some nice JavaFX features like borderless application, multilingualism, animations aso..
TODO
In JavaFX it's really simple to create a borderless application with transparent background color.
In the first step the background color from the Scene needs to set to transparent
.
@Override
public void start(Stage primaryStage) throws Exception {
...
final Scene scene = new Scene(view.getView(), 330.0d, 330.0d);
scene.setFill(Color.TRANSPARENT);
...
}
In the second step the style
from the Stage need to be adjusted.
@Override
public void start(Stage primaryStage) throws Exception {
...
// Defines a normal Stage style with a solid white background and platform decorations.
stage.initStyle(StageStyle.DECORATED);
// Defines a Stage style with a solid white background and no decorations.
stage.initStyle(StageStyle.UNDECORATED);
// Defines a Stage style with a transparent background and no decorations.
stage.initStyle(StageStyle.TRANSPARENT);
...
}
Image: Demonstration from different StageStyles
From left to right: decorated
, undecorated
, transparent
TODO
TODO
TODO
TODO
TODO
- If not installed download minimal JRE 8 or the JDK 8.
- Download the file yin-yang-0.1.0.zip.
- Extract the file to a place your choice.
- To start the application double click the jar file 'yin-yang-0.1.0.jar' in the extracted folder.
- If you find a
Bug
I will be glad if you could report an Issue. - If you want to contribute to the project plz fork the project and do a Pull Request.
The project Yin-Yang
is licensed under General Public License 3.0.
The project Yin-Yang
is maintained by me, Peter Rogge. See Contact.
You can reach me under peter.rogge@yahoo.de.