Unterschiede
Hier werden die Unterschiede zwischen der gewählten und der aktuellen Version gezeigt.
| javafx:application-example 2015/01/07 14:47 | javafx:application-example 2020/01/22 20:59 aktuell | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| [[javafx:javafx|JavaFX]]\\ | [[javafx:javafx|JavaFX]]\\ | ||
| - | ====== Programm-Argumente ====== | + | ====== Mini-JavaFX-Anwendung ====== |
| Hier ist eine kleine beispielhafte Minianwendung mit JavaFX:\\ | Hier ist eine kleine beispielhafte Minianwendung mit JavaFX:\\ | ||
| + | {{:javafx:myfxapplication.png|}} | ||
| \\ | \\ | ||
| <html> | <html> | ||
| Zeile 24: | Zeile 25: | ||
| \\ | \\ | ||
| <code java> | <code java> | ||
| - | public class MyApplication extends Application { | + | package com.sowas.javawiki.javafx; |
| + | |||
| + | import javafx.application.Application; | ||
| + | import javafx.scene.Scene; | ||
| + | import javafx.scene.control.Label; | ||
| + | import javafx.stage.Stage; | ||
| + | |||
| + | public class MyFxApplication extends Application { | ||
| @Override | @Override | ||
| public void start(Stage mainStage) { | public void start(Stage mainStage) { | ||
| - | mainStage.setTitle("Titeltext"); | + | mainStage.setTitle("Mini-JavaFX-Anwendnung"); |
| - | // Inhalt des Fensters | + | Label label = new Label("Hallo World."); |
| - | Label label = new Label("Das ist ein Text."); | + | |
| Scene scene = new Scene(label); | Scene scene = new Scene(label); | ||
| Zeile 43: | Zeile 50: | ||
| } | } | ||
| </code> | </code> | ||
| + | \\ | ||
| + | \\ | ||
| + | Stichworte: | ||
| + | <code> | ||
| + | JavaFX Beispiel, Minianwendung, Hello World, einfach | ||
| + | </code> | ||
| + | |||