次のソースを作成し、動作を検証後、使っているクラスの中で役割の知らないクラスを調べて、説明のコメントを追加せよ。
package testfx;
import javafx.application.Application;
import javafx.stage.Stage;
public class Test extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.show();
}
public static void main(String[] args) {
System.out.println("Hello Novel World");
launch(args);
}
}
インスタンス変数として、以下をように変数を宣言せよ。
Scene scene; TextArea text =new TextArea();
そして、それらを使うための次の記述を追加せよ。
this.scene = new Scene(text,300,100); primaryStage.setScene( this.scene );