00:01
In this question, we have to write a code in java.
00:04
So, let us look at the steps that we will be following in solving this question.
00:10
So, first we will be creating a main class.
00:13
This class will be the entry point of the javafx application.
00:23
It will have an application class and start method.
00:37
So, it sets, this will set the title of the stage that is the window to the super calculator that we are making and it sets the loaded scene to the stage.
00:49
So now, let us have a look at the second step that we are going to follow in this case.
00:55
So second step is the controller class.
01:08
So in this case, we are, this class will be responsible for handling events and logic for the calculator gui that will be there.
01:18
So it will be responsible for handling events and logic.
01:33
So this will have the fxml annotations of the field and methods to establish a connection with the corresponding elements.
01:44
So we will see that what all will be included in this later on in the code.
01:50
And third step we will be having is the fxml file.
01:59
Now this is the calculator .fxml.
02:02
So this file will describe the structure and layout of the gui that is there.
02:08
So we will see what all it will include into, in a program compiler, right, like this.
02:18
So now we will be starting first with our first class that is our main class.
02:28
So for that, first we will be importing all the necessary files that are there.
02:35
So after doing this, we will be starting with the main class that is application.
02:42
So once this begin, we will be writing the main content of the main class like this.
02:49
So here what we have done is, this is the entry point of the javafx application.
02:56
So here it extends the application class and it overrides the start method as you can see.
03:02
So in the start method, it loads the fxml file that is the calculator .fxml file that is using the fxml loader class.
03:14
So it sets the title of the stage that is the window that is there to the super calculator x and sets the loaded scene to the stage.
03:25
So finally it shows the stage that is there.
03:28
So for that we are using primary stage .show.
03:33
So now we will be using, now we will come to the controller class.
03:38
So for this controller class, we will be importing these necessary header files...