I am not sure whether my solution is the canonical approach, but it’s been an interesting first exposure to threads and given me a bit more insight into the workings of Java FX. Fw-300 #ya-qn-sort h2 /* Breadcrumb */ #ya-question-breadcrumb #ya-question-breadcrumb i #ya-question-breadcrumb a #bc .ya-q-full-text, .ya-q-text #ya-question-detail h1 html[lang="zh-Hant-TW"] .ya-q-full-text, html[lang="zh-Hant-TW"] .ya-q-text, html[lang="zh-Hant-HK"] .ya-q-full-text, html[lang="zh-Hant-HK"] .ya-q-text html[lang="zh-Hant-TW"] #ya-question-detail h1, html[lang="zh-Hant-HK"] #ya-question-detail h1 #Stencil . All you need to do is adapt the second example i posted to your case and all the threading will be taken care of But would not the updating of the progress bar be in this different thread as well because it's inside the loop?the problem is that the loop is *not* inside the different thread you need to move it into the run() method of the thread so it is run in the different thread I am in class the next 2 days I will try these suggestions Friday when I am back at work.The first layer is the window used to move the application around the screen of your computer.
This sample code below shows how to build an application out of a JFrame, two JPanels and a JButton, which determines the visibility of the components held in the two JPanels.
Implementing long-running tasks on the Java FX Application thread inevitably makes an application UI unresponsive.
A best practice is to do these tasks on one or more background threads and let the Java FX Application thread process user events.
I am working on a GUI for a Tic Tac Toe app, using Java FX.
Having spent most of my time programming in the single-threaded world of Java Script, I’m not too familiar with the concept of multiple threads and concurrency.