Skip to content

Instantly share code, notes, and snippets.

@thinkphp
Created November 24, 2018 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thinkphp/da24014113e54744fcbad534de98075f to your computer and use it in GitHub Desktop.
Save thinkphp/da24014113e54744fcbad534de98075f to your computer and use it in GitHub Desktop.
import javafx.application.Application;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;
public class HelloWorld extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Label label = new Label("Hello World");
label.setAlignment(Pos.CENTER);
primaryStage.setScene(new Scene(label, 300, 250));
primaryStage.setTitle("Hello World Application");
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment