brunomnsilva / JavaFXSmartGraph

Generic (Java FX) Graph Visualization Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when using SmartGraph

Mohammed-Ryiad-Eiadeh opened this issue · comments

when I use this repository, I got this error, can you help me with that?

the error: "Exception in thread "main" java.lang.ExceptionInInitializerError
at com.brunomnsilva.smartgraph.graphview.SmartGraphPanel.addEdge(SmartGraphPanel.java:506)
at com.brunomnsilva.smartgraph.graphview.SmartGraphPanel.initNodes(SmartGraphPanel.java:433)
at com.brunomnsilva.smartgraph.graphview.SmartGraphPanel.(SmartGraphPanel.java:199)
at com.brunomnsilva.smartgraph.graphview.SmartGraphPanel.(SmartGraphPanel.java:163)
at com.brunomnsilva.smartgraph.graphview.SmartGraphPanel.(SmartGraphPanel.java:148)
at MainClass.Main.main(Main.java:49)
Caused by: java.lang.IllegalStateException: Toolkit not initialized
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:436)
at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:431)
at com.sun.javafx.application.PlatformImpl.setPlatformUserAgentStylesheet(PlatformImpl.java:724)
at com.sun.javafx.application.PlatformImpl.setDefaultPlatformUserAgentStylesheet(PlatformImpl.java:686)
at javafx.scene.control.PopupControl.(PopupControl.java:89)
... 6 more"

Note: I use JDK 17

You provide little to no information on how you're using this library.

This is a JavaFX library and uses such components. Are you using the library and running your app as a JavaFX program? I would expect to see the exception thrown like "Exception in Application start method", but I see a simple "Main.main" class in your output.

Closing issue as the problem seems related to a incorrect javafx environment.