package com.github.hunter0x7c7.sync; import com.github.hunter0x7c7.sync.model.storage.Session; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.stage.Stage; import static com.github.hunter0x7c7.sync.model.global.Parameters.AppNameString; public class Main extends Application { @Override public void start(Stage stage) throws Exception { Session.getInstance().setPrimaryStage(stage); Parent root = FXMLLoader.load(getClass().getResource("/forxml/sample.fxml")); stage.setTitle(AppNameString);//数据同步工具(传感器) v1.0 stage.setScene(new Scene(root, 600, 380)); stage.getIcons().add(new Image("mipmap/ic_chinese_cabbage_48.png")); stage.setResizable(false); stage.show(); } public static void main(String[] args) { launch(args); } @Override public void init() throws Exception { super.init(); } }