Uploaded March 2022 | Updated November 2026, 17 hours ago
In this tutorial, we will explore JavaFX Concurrency and learn how to make use of JavaFX Background Tasks to make the JavaFX applications run faster, smoother, and snappier.
JavaFX main thread (or the GUI thread) is responsible for drawing and refreshing the contents shown on the screen 60 times a second. That means the delay between each frame is only 16.67 milliseconds. If we do complex calculations or time-consuming blocking works on this main thread, then it will not be able to reach the 60fps target. In fact, it can even reduce to 1 frame per 3s or 5s which could make the application "not responding". If the application is non-responsive for a couple of seconds, the OS will start showing the "not responding" title on the title.
JavaFX provides support for offloading time-consuming tasks into a background thread using the Task approach. Tasks provide a very easy and direct approach for executing code asynchronously while providing constant updates to the GUI thread. In this chapter, we will explore the javafx.concurrent.Task and see how to make use of it to seamlessly run complex background operations in a separate thread while updating the GUI consistently.
Github Project: github.com/afsalashyana/JavaFX-Tutorial-Codes/tree/master/JavaFX%20Task
Genuine Coder Blog: genuinecoder.com
#JavaFX #Multithreading #Java
Introduction: (0:00)
Understand the problem with the GUI thread: (2:33)
Create a new background task: (04:29)
Update label from background task: (09:52)
Add progress bar to track progress: (12:57)
How to cancel a running task: (17:14)
In this tutorial, we will explore JavaFX Concurrency and learn how to make use of JavaFX Background Tasks to make the JavaFX applications run faster, smoother, and snappier.
JavaFX main thread (or the GUI thread) is responsible for drawing and refreshing the contents shown on the screen 60 times a second. That means the delay between each frame is only 16.67 milliseconds. If we do complex calculations or time-consuming blocking works on this main thread, then it will not be able to reach the 60fps target. In fact, it can even reduce to 1 frame per 3s or 5s which could make the application "not responding". If the application is non-responsive for a couple of seconds, the OS will start showing the "not responding" title on the title.
JavaFX provides support for offloading time-consuming tasks into a background thread using the Task approach. Tasks provide a very easy and direct approach for executing code asynchronously while providing constant updates to the GUI thread. In this chapter, we will explore the javafx.concurrent.Task and see how to make use of it to seamlessly run complex background operations in a separate thread while updating the GUI consistently.
Github Project: github.com/afsalashyana/JavaFX-Tutorial-Codes/tree/master/JavaFX%20Task
Genuine Coder Blog: genuinecoder.com
#JavaFX #Multithreading #Java
Introduction: (0:00)
Understand the problem with the GUI thread: (2:33)
Create a new background task: (04:29)
Update label from background task: (09:52)
Add progress bar to track progress: (12:57)
How to cancel a running task: (17:14)





![JDBC Tutorial for Beginners #9 : Delete Records from Database
This video exaplains how to remove records from database. DELETE command is used to delete rows from MySQL tables. The Syntax of DELETE command is as follows.
DELETE FROM table_name [WHERE Clause]
» If WHERE clause is not specified, then all the records will be deleted from the given MySQL table.
»You can specify any condition using WHERE clause.
»You can delete records in a single table at a time.
A new button is added. When clicked, the selected row from the table will be taken. Name of the selected user will be used for delete operation.
This tutorial series covers following topics
■ Connecting Java Program to MySQL Database
■ Inserting data into database
■ Fetching data from database
■ Updating an entry in database
■ Deleting an entry from database
■ Creating a table programmatically
■ Using PreparedStatements
■ Display database contents in JTable
■ Calling stored procedures
- Genuine Coder
http://www.genuinecoder.com/ JDBC Tutorial for Beginners #9 : Delete Records from Database](https://i.ytimg.com/vi/rXaI53xYvKo/mqdefault.jpg)




