Created
January 18, 2012 19:28
-
-
Save naokirin/1635048 to your computer and use it in GitHub Desktop.
JavaFX Hello,World
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javafx.application.Application; | |
import javafx.stage.Stage; | |
import javafx.scene.Scene; | |
import javafx.scene.layout.HBox; | |
import javafx.scene.control.Label; | |
public class JavaFXHelloWorld extends Application{ | |
public static void main(String[] args){ | |
Application.launch(JavaFXHelloWorld.class, args); | |
} | |
@Override | |
public void start(Stage stage) { | |
HBox hbox = new HBox(); | |
Scene scene = new Scene(hbox); | |
hbox.getChildren().add(new Label("Hello, World")); | |
stage.setScene(scene); | |
stage.setTitle("Hello"); | |
stage.show(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment