-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication.java
More file actions
43 lines (34 loc) · 1.02 KB
/
application.java
File metadata and controls
43 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package lordOfTheRings;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import java.io.IOException;
public class application extends Application {
/**
* Creación y edición (ICONO Y TÍTULO) del STAGE y carga de la interfaz gráfica
*
* @param stage
* @throws IOException
*/
@Override
public void start(Stage stage) throws IOException {
Parent fxmlLoader = FXMLLoader.load((application.class.getResource("interfaz.fxml")));
Scene escena = new Scene(fxmlLoader);
stage.getIcons().add(new Image(application.class.getResourceAsStream("Icono.png")));
stage.setTitle("El Señor de los Anillos");
stage.setResizable(false);
stage.setScene(escena);
stage.show();
}
/**
* Función Principal
*
* @param args
*/
public static void main(String[] args) {
launch();
}
}