open:javafx

JavaFX

Create Visual Effects
Add 2D & 3D Transformations
Add Transitions & Animation
Incorporate Media
Application Logic
Work with the Scene Graph
Use Properties and Binding
Work with Collections
Interoperability
Use Concurrency and Threads
Integrate JavaFX and Swing
Integrate JavaFX and SWT
Reference
JavaFX API Documentation
CSS Reference Guide
Introduction to FXML
Stage > StackPane >

참고 - http://docs.oracle.com/javafx/2/get_started/hello_world.htm

snippet.java
package application;
 
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
 
 
public class Main extends Application {
	@Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("Hello World!");
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {
 
            @Override
            public void handle(ActionEvent event) {
                System.out.println("Hello World!");
            }
        });
 
        StackPane root = new StackPane();
        root.getChildren().add(btn);
        primaryStage.setScene(new Scene(root, 300, 250));
        primaryStage.show();
    }
 
	public static void main(String[] args) {
		launch(args);
	}
}

  • open/javafx.txt
  • 마지막으로 수정됨: 2020/06/02 09:25
  • 저자 127.0.0.1