import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Scene; import javafx.scene.layout.GridPane; import javafx.stage.Stage; import java.io.IOException; public class BaseConverterApp extends Application { @Override public void start(Stage primaryStage) { try { // 加载FXML文件 FXMLLoader loader = new FXMLLoader(getClass().getResource("BaseConverter.fxml")); GridPane root = loader.load(); // 设置场景和舞台 Scene scene = new Scene(root, 400, 250); primaryStage.setTitle("进制转换器"); primaryStage.setScene(scene); primaryStage.show(); } catch (IOException e) { e.printStackTrace(); } } public static void main(String[] args) { launch(args); } }