I have some code and when it executes, it throws a RuntimeException, saying:
JXBrowser should only be constructed on the EDT
it is stemming from when I'm creating a JXbrowser component
browser = (JXBrowser) browserFactory.create(true, WebBrowserType.JX);
What should I look for in fixing this error?
JavaFX (OpenJFX) is not thread-safe.
Like Swing, Vaadin, and most any other user-interface framework, you must limit all access to, and manipulation of, the widgets and other UI-related objects only from within the one thread dedicated to that framework.
Apparently your app is starting other threads and then performing JavaFX work on them. Never do this.
There are ways for you to perform lengthy tasks on background threads, and then upon completion post a request to the UI thread to update the UI widgets with the results. But you must study to learn those techniques.
See this tutorial and this one.