Created
April 8, 2015 15:02
-
-
Save aoetk/01dd84f4bc05ea26c13f to your computer and use it in GitHub Desktop.
Unified Styleのサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sample; | |
import javafx.application.Application; | |
import javafx.scene.Scene; | |
import javafx.scene.control.Label; | |
import javafx.scene.layout.StackPane; | |
import javafx.scene.paint.Color; | |
import javafx.stage.Stage; | |
import javafx.stage.StageStyle; | |
public class UnifiedSampleApp extends Application { | |
@Override | |
public void start(Stage primaryStage) throws Exception{ | |
StackPane testPane = new StackPane(); | |
testPane.setStyle("-fx-background-color:transparent;"); | |
Label someText = new Label("TEXT AGAINST TRANSPARENT SCENE"); | |
testPane.getChildren().add(someText); | |
Scene myScene = new Scene(testPane, 500, 500); | |
myScene.setFill(Color.TRANSPARENT); | |
primaryStage.setScene(myScene); | |
primaryStage.initStyle(StageStyle.UNIFIED); | |
primaryStage.setTitle("Application"); | |
primaryStage.show(); | |
} | |
public static void main(String[] args) { | |
launch(args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment