HanSolo / medusa

A JavaFX library for Gauges
Apache License 2.0
688 stars 129 forks source link

Gauge inside javafx.embed.swing.JFXPanel sometimes not updated #139

Open olpf opened 6 years ago

olpf commented 6 years ago

Hi, I use some eu.hansolo.medusa.Gauge instances inside a JFXPanel inside Swing. Each gauge shows its value as number and with the "needle value". Under some circumstances sometimes the needle is freezed but the number still shows the correct value. Also sometimes the number is freezed and the needle is correct. I could not reproduce this insde Netbeans. This only happens if it runs outside the IDE. Any ideas? Regards Oli

HanSolo commented 6 years ago

Hi there, 🤔 to be honest I don‘t have an idea yet. Could you at least provide a code snippet that I can use to try to reproduce? Cheers, Gerrit

olpf commented 6 years ago

Probably changing: anGauge.setValue(value); to Platform.runLater(() -> { anGauge.setValue(value); });

solves it.