JavaFX - 加载FXML文件错误 [英] JavaFX - loading FXML file error

查看:757
本文介绍了JavaFX - 加载FXML文件错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,关注使用Scene Builder 1.0加载FXML文件。
我创建了一个类 Warrning ,之后我在我的包中添加了一个FXML文件并将其命名为 WarrningGUI 。 Creator创建了一个名为 WarrningGUIContoller 的控制器类。在那之前一切都很好。我盯着为我的应用程序创建一个布局。在我添加了两个原始面板并在场景生成器中打开和关闭我的FXML文件大约2-3次出现之后:

I have strange problem which is concerned to loading FXML file using Scene Builder 1.0. I have created a class Warrning and after that I add to my package a FXML file and called it WarrningGUI. Creator has created a Contoller class called WarrningGUIContoller. Until then everything was fine. I stared to create a layout for my application. After I added two raw Panels and turned on and off my FXML file in Scene Builder about 2-3 times something like that appeared:

这是在详情中:

还有我的项目文件:

http://www59.zippyshare.com/v/94923569/file.html

有谁知道什么正在进行?

感谢您的帮助:)

推荐答案

在NetBeans 7.3上,不要使用Make Controller来更新控制器文件以反映更新。每次使用Make Controller时它都会注入fx:controller。

On NetBeans 7.3 onwards dont use "Make Controller" to update your controller file to reflect the updates. It will inject fx:controller every time "Make Controller" is used.

这篇关于JavaFX - 加载FXML文件错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆