Remember those 4 requirements in order to be able to run a JavaFX apllication. The very first program is written below :
package javafxfirstapplication;
import javafx.application.Application;
import javafx.stage.Stage;
/**
*
* @author Joko Adianto
*/
public class JavaFXFirstApplication extends Application {
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("JavaFX : First Application");
primaryStage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}
The picture below is the screenshot of the above program
The picture below is the screenshot of the above program
Here are four exercises to write a JavaFX program that has title of
JavaFX : Second application
....
....
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("JavaFX : Second Application");
primaryStage.show();
}
....
....
....
....
JavaFX : Third application
....
....
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("JavaFX : Third Application");
primaryStage.show();
}
....
....
....
....
JavaFX : Fourth application
....
....
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("JavaFX : Fourth Application");
primaryStage.show();
}
....
....
....
....
JavaFX : Fifth application
....
....
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("JavaFX : Fifth Application");
primaryStage.show();
}
....
....
I think its better to rewrite those program, than just "Copy & Paste"ing.
....
....
I think its better to rewrite those program, than just "Copy & Paste"ing.

No comments:
Post a Comment