我要绑定的JavaFX Label.textProperty与int价值.
我试过例如
Label.textProperty().bindBidirectional(new SimpleIntegerProperty(myInt),
new NumberStringConverter());
Run Code Online (Sandbox Code Playgroud)
要么
Label().textProperty().bindBidirectional(new SimpleIntegerProperty(myInt),
new DecimalFormat());
Run Code Online (Sandbox Code Playgroud)
但我总是得到NullPointerException.
我该如何解决?