简体   繁体   English

如何在Eclipse中使用fxml?

[英]How can I use fxml in Eclipse?

I was wondering about using fxml in eclipse. 我想知道在Eclipse中使用fxml。 I watched a Video about JavaFX where the Creator handles the UI with a fxml File(He uses Eclipse too). 我观看了有关JavaFX的视频,其中Creator通过fxml文件处理UI(他也使用Eclipse)。 But my Eclipse doesnt recognize that I use fxml(Maybe doesnt have fxml?). 但是我的Eclipse无法识别我使用的是fxml(也许没有fxml?)。 Is there any way I can add fxml to eclipse? 有什么办法可以将fxml添加到eclipse吗?

Screenshot 截图

You can also get the e(fx)clipse plugin (which allows you to create fxmls) by opening Eclipse, clicking Help, scrolling down to the Eclipse Marketplace, and searching e(fx)clipse. 您还可以通过打开Eclipse,单击“帮助”,向下滚动到Eclipse Marketplace并搜索e(fx)clipse来获得e(fx)clipse插件(允许您创建fxml)。 Install, and then just restart Eclipse. 安装,然后重新启动Eclipse。 To create a new JavaFX project, go to File->New->Project...->JavaFX->JavaFX Project, and you should be good to go (these instructions are based on using Eclipse Neon). 要创建一个新的JavaFX项目,请转至File-> New-> Project ...-> JavaFX-> JavaFX Project,您应该一切顺利(这些说明基于使用Eclipse Neon)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM