-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTesteFX.java
52 lines (39 loc) · 1.31 KB
/
TesteFX.java
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
44
45
46
47
48
49
50
51
52
package edu.curso;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.text.Font;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
public class TesteFX extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Pane pan = new Pane();
Scene scn = new Scene(pan, 600, 400);
Label txtTitulo = new Label("Login no Sistema");
txtTitulo.relocate(100, 40);
Font fnt = new Font(30);
txtTitulo.setFont(fnt);
Label txtUser = new Label("User ID");
txtUser.relocate(100, 120);
TextField lblUser = new TextField();
lblUser.relocate(180, 120);
Label txtPasswd = new Label("Password");
txtPasswd.relocate(100, 200);
TextField lblPasswd = new TextField();
lblPasswd.relocate(180, 200);
Button btnLogin = new Button("Login");
btnLogin.relocate(100, 280);
Button btnRegister = new Button("Registration");
btnRegister.relocate(250, 280);
pan.getChildren().addAll(txtTitulo, txtUser, lblUser, txtPasswd, lblPasswd, btnLogin, btnRegister);
primaryStage.setScene(scn);
primaryStage.setTitle("Login");
primaryStage.show();
}
public static void main(String[] args) {
Application.launch(TesteFX.class, args);
}
}