Introduction to JavaFX development
- 4.5 hours on-demand video
- 6 downloadable resources
- Full lifetime access
- Access on mobile and TV
- Certificate of Completion
Get your team access to 4,000+ top Udemy courses anytime, anywhere.Try Udemy for Business
- Build a JavaFX application
- Use SceneBuilder to create a user interface
- How to link your UI objects to Java objects
- How to create text, text areas and drop down options
- How to layout objects for a consistent presentation
- How to connect to a server, initiate and complete an exchange
- Provide user feedback via your user interface
- How to include JavaFX into your Eclipse development environment
- How to send and receive Universal Data Packages (UDP)
How TFTP manages the transfer of the file data. The video looks at the roles of the client and the server when sending or receiving information from the client. The types of message that are supported by TFTP as well as how to structure the packets of data ready for transmission.
In the previous section we learnt about what TFTP is and how it works. With this understanding we now look at what information we will need to provide in order to communicate with a server. From this we can sketch out what information we need to collect using our application interface. Once we understand this we are able to sketch out how we want our application to look.
Now we know what we want our application to look like, we need to take a look at what else our application needs and how we are going to link all these bits together. The video covers the structure of JavaFX as well as the class structure for the various components of the application. The application makes use of Model-View-Control (MVC) approach as well as a custom message event which is fired from the TFTP engine. All of these classes will be hand build as part of the course so this video introduces the student to the function of each class and how they relate to one another.
This video covers the software and tools required to complete the coding side of the course. The student is shown where to find the software and how to install. There is some configuration of Eclipse so that it can locate SceneBuilder which is explained. Also, Eclipse requires either a plugin for JavaFX or a version of Eclipse with JavaFX already installed. Both of these options are covered, allowing the Student to adopt the approach that best suits their situation.
Creating a JavaFX project in Eclipse ready for building the application.
A review of what our application user interface needs to have and do ready to actually start building.
Explains how we will manage the conversation with the server. Starting with the initial call to the engine and going all the way through to completion of the transfer including how the process will tidy up after itself so we avoid leaving open file connections or network socket connections. Creates the engine class which we will go on to extend to manage all the server conversations.
Builds up the Initiate method which is responsible for making the initial call to the TFTP server passing it the client ip number and port which the server should use when responding. Covers building the byte array containing the request,wrapping the byte array in a Datagram packet and sending the packet to the server using the UDP socket.
This video looks at how we will manage the conversation with the TFTP server when we are sending a file to the server. This looks at the key actions we take which includes the code for the method which manages the transfer. Here we cover the exchange of information between the client and the server when send a file.
The methods covered in this video are part of the engine class. They deal with accessing the source file we wish to send, handle the conversion between the text formats supported and make use of the DataParser class. Creates a temporary file with the data we wish to send, converted if required.
In this video we read the data from the server and providing there is no error, we build the data we wish to send to the server. As this section is all about send a file to the server we are building a data packet and receiving acknowledgement messages. This video pulls together the all the previous parts of send a file to the server.
This video looks at how we will manage the conversation with the TFTP server when receiving a file from the server. This looks at the key actions we take which includes the code for the method which manages the transfer. Here we cover the exchange of information between the client and the server when receiving a file. This method makes use of many of the components used in sending a file to the server as well as using a similar approach so it will be familiar to the student.
Earlier on we created a method to build data packets to send to the server. In this video we look at how we build acknowledgement packets to let the server know we have received the data packet sent to us. This completes the code for our engine class to send and receive files with a TFTP server.
Here in the last video we use our TFTP client to download an ascii file from the server and upload a binary file to the server. We can see from the file locations used by the server and client that the files have been transferred as well as the commentary within the server and eclipse consoles, not to mention our status field in our application.
- Some knowledge of Java would be beneficial or at least an interest in programming
- JavaSE 8 or above (freely available)
- Eclipse 4.4 or above (freely available)
- SceneBuilder 8 (freely available)
- TFTP server with which to interact with (freely available)
I wanted to do a tutorial on JavaFX. The idea, as always with me, was to show how to build a real application in JavaFX. I wanted it to be a real solution not a series of examples of what you can do. I wanted to build something that could be used, something that served a purpose.
So, I searched around and found a specification document. This specification describes how to implement what is known as a Trivial File Transfer Protocol (TFTP). This is described as a simplified version of the File Transfer Protocol specification, used to move files between machines, so is ideal to use as an example. There are two parts to this, a client and a server so, for our JavaFX tutorial we will build a TFTP client. There are also TFTP servers freely available so we have a server that we can test our client against.
How the course is structured:
The course is split into 5 sections from setting up through to packaging it all up. Along the way we look at designing and building the front end, pulling together the logic for the backend and linking the parts together.
Delivery of course content is primarily through the use of video sessions demonstrating a specific point. As you go through the sections you can run the application and see how it develops and builds on the previous sections.
At the end of the course you will be able to take the techniques covered in the course and apply these to your own development projects
- Anyone who knows the basics of Java.
- Anyone who wants to develop their Java knowledge and learn JavaFX.
- Anyone who wants to move from following examples to designing and building their own applications.