36 lines
1.0 KiB
Java
36 lines
1.0 KiB
Java
package dev.bytevibe.hyperpoint;
|
|
|
|
import javafx.application.Application;
|
|
import javafx.fxml.FXMLLoader;
|
|
import javafx.scene.Group;
|
|
import javafx.scene.Scene;
|
|
import javafx.scene.image.Image;
|
|
import javafx.scene.paint.Color;
|
|
import javafx.scene.text.Text;
|
|
import javafx.stage.Stage;
|
|
|
|
import java.awt.desktop.AppForegroundListener;
|
|
import java.io.IOException;
|
|
|
|
public class Main extends Application {
|
|
public static void main(String[] args) {
|
|
Application.launch(args);
|
|
}
|
|
@Override
|
|
public void start(Stage primaryStage) throws Exception {
|
|
Group root = new Group();
|
|
Scene scene = new Scene(root, Color.GRAY);
|
|
primaryStage.setScene(scene);
|
|
|
|
// 设置主要窗口的属性
|
|
Image icon = new Image(getClass().getResourceAsStream("icon.png"));
|
|
primaryStage.getIcons().add(icon);
|
|
primaryStage.setTitle("HyperPoint");
|
|
primaryStage.setWidth(800);
|
|
primaryStage.setHeight(600);
|
|
primaryStage.setResizable(false);
|
|
|
|
primaryStage.show();
|
|
}
|
|
}
|