1

我是 ControlsFX 的新用户,但有一个我不明白的问题:

我的代码:

Dialogs.create()
    .owner(mainStage)
    .title("Information Dialog")
    .masthead("Test masthead")
    .message("Test message")
    .showInformation();

我得到一个例外:

Exception in thread "JavaFX Application Thread" java.util.MissingResourceException: Can't find bundle for base name impl.org.controlsfx.dialog.resources.oxygen.dialog-resources, locale fr_FR

有人知道为什么会这样吗?

谢谢你。

4

1 回答 1

1

你下载了正确的 JAR 吗?又名:ControlsFX-8.0.6

因为我使用指定的 JAR 制作了这个最简单的程序,并且没有出现错误:

    import javafx.application.Application;
import javafx.stage.Stage;
import org.controlsfx.dialog.Dialogs;


public class Test extends Application {

    @Override
    public void start(Stage primaryStage) {
        Dialogs.create()
                .owner(primaryStage)
                .title("Information Dialog")
                .masthead("Test masthead")
                .message("Test message")
                .showInformation();
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        launch(args);
    }
}

还请考虑在此处的官方群组支持中提出您的问题:http ://groups.controlsfx.org ,您可能会有更多答案。

于 2014-08-12T13:08:12.010 回答