You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
714 B
27 lines
714 B
1 month ago
|
import javafx.application.Application;
|
||
|
import javafx.fxml.FXMLLoader;
|
||
|
import javafx.scene.Parent;
|
||
|
import javafx.scene.Scene;
|
||
|
import javafx.stage.Stage;
|
||
|
|
||
|
import java.io.IOException;
|
||
|
|
||
|
public class Calculator extends Application {
|
||
|
|
||
|
@Override
|
||
|
public void start(Stage primaryStage) throws IOException {
|
||
|
// 加载FXML文件
|
||
|
FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource("/CalculatorView.fxml"));
|
||
|
Parent root = fxmlLoader.load();
|
||
|
|
||
|
Scene scene = new Scene(root, 600, 500);
|
||
|
primaryStage.setTitle("计算器");
|
||
|
primaryStage.setScene(scene);
|
||
|
primaryStage.show();
|
||
|
}
|
||
|
|
||
|
public static void main(String[] args) {
|
||
|
launch(args);
|
||
|
}
|
||
|
}
|