Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create AddFunctionToJavaGuiCalculator #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dlduddls000
Copy link
Collaborator

package com;

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 CalculatorApp extends Application {

//start ->  메서드는 Application 클래스의 추상 메서드로,
//JavaFX 애플리케이션의 진입점 역할.
//애플리케이션이 시작될 때 호출되며, 애플리케이션의 초기 설정, UI 구성 등을 담당
@Override
@SuppressWarnings("deprecation")
public void start(Stage primaryStage) {
    try {
        Parent root = FXMLLoader.load(getClass().getResource("/com/example/calculator_hdal/hello-view.fxml"));
        primaryStage.setTitle("Calculator");
        //gui 크기 설정
        primaryStage.setScene(new Scene(root, 300, 400));
        primaryStage.show();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

public static void main(String[] args) {
    //launch() : JavaFX 시작.
    launch(args);
}

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant