Читаем Java. Создание приложений полностью

Она задает надпись в заголовке окна. Без этой строки шапка окна будет пустой.


Вот, собственно, стартовый класс:


/*

 * To change this license header, choose License Headers in Project Properties.

 * To change this template file, choose Tools | Templates

 * and open the template in the editor.

 */

package reader;


import javafx.application.Application;

import javafx.fxml.FXMLLoader;

import javafx.scene.Parent;

import javafx.scene.Scene;

import javafx.stage.Stage;


/**

 *

 * @author kaa

 */

public class Reader extends Application {

    @Override

    public void start(Stage stage) throws Exception {

        Parent root = FXMLLoader.load(getClass.getResource("FXMLReader.fxml"));

        Scene scene = new Scene(root);

        stage.setScene(scene);

        stage.setTitle("TXTReader");

        stage.show;

 }

    /**

Перейти на страницу:

Похожие книги