-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainPageController.java
68 lines (60 loc) · 1.72 KB
/
MainPageController.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* 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.
*/
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.stage.Stage;
/**
* FXML Controller class
*
* @author hp
*/
public class MainPageController implements Initializable {
@FXML
public Button customer;
@FXML
public Button professional;
@FXML
public Button Exit;
@FXML
public void customer_click(ActionEvent event) throws IOException
{
System.out.println("customer clicked");
Stage temp = new Stage();
Parent root = FXMLLoader.load(getClass().getResource("Login.fxml"));
Scene scene =new Scene(root);
temp.setTitle("load");
temp.setScene(scene);
temp.show();
}
@FXML
public void professional_click(ActionEvent event) throws IOException
{
System.out.println("professional clicked");
Stage temp = new Stage();
Parent root = FXMLLoader.load(getClass().getResource("PLogin.fxml"));
Scene scene =new Scene(root);
temp.setTitle("load");
temp.setScene(scene);
temp.show();
}
@FXML
public void Exit(ActionEvent event)
{
System.exit(0);
}
@Override
public void initialize(URL url, ResourceBundle rb) {
// TODO
}
}