본문 바로가기
GUI( JavaFX Scene Builder )/SceneBuilder

Controller(2_Java_Main)

by pms93 2022. 8. 22.
package ex1;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

public class Ex3 extends Application {

	public static void main(String[] args) {
		launch(args);
	}
	
	@Override
	public void start(Stage primaryStage) throws Exception {
		FXMLLoader loader = new FXMLLoader(getClass().getResource("Ex3.fxml"));
		Parent p = loader.load();
		Scene scene = new Scene(p, 500, 250);
		
		primaryStage.setScene(scene);
		primaryStage.show();
	}

}

'GUI( JavaFX Scene Builder ) > SceneBuilder' 카테고리의 다른 글

Controller(2_Java_FXML)  (0) 2022.08.22
Controller(2_Java_Controller)  (0) 2022.08.22
Controller(1_Java_FXML)  (0) 2022.08.22
Controller(1_Java_Controller)  (0) 2022.08.22
Controller(1_Java_Main)  (0) 2022.08.22