-
-
Save kaecy/b9dde6b8145175de6d78f5559215ded3 to your computer and use it in GitHub Desktop.
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
import javafx.application.Application; | |
import javafx.stage.Stage; | |
import javafx.scene.Scene; | |
import javafx.scene.layout.*; | |
import javafx.scene.control.*; | |
import javafx.scene.image.*; | |
import javafx.geometry.*; | |
public class miniturized extends Application { | |
@Override | |
public void start(Stage primaryStage) { | |
BorderPane layout = new BorderPane(); | |
VBox bbox = new VBox(); | |
Image image = new Image(getClass().getResourceAsStream("circle.png")); | |
ImageView imgview = new ImageView(image); | |
bbox.setAlignment(Pos.TOP_RIGHT); | |
bbox.getChildren().add(imgview); | |
layout.setTop(bbox); | |
Scene scene = new Scene(layout, 100, 100); | |
primaryStage.setScene(scene); | |
//stage.initStyle(StageStyle.UNDECORATED); don't do this if you aren't going to implement the stuff a user expects from a window | |
primaryStage.show(); | |
} | |
public static void main(String[] arguments) { | |
launch(arguments); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment