NetBeansUpdate 后无法编辑 JFrame 表单

发布于 2024-10-26 19:58:33 字数 314 浏览 2 评论 0原文

最近,我一直在 NetBeans 中使用内置的 GUI 编辑器开发一个项目。之前我注意到它生成了一个 XML“.form”文件,该文件没有出现在项目资源管理器窗格中,这是有意义的。早些时候,当我在“设计”选项卡中处理表单时,它通知我有 15 个更新。我只是更新了,没有阅读任何内容,这可能是一个坏主意,但是当我重新启动 IDE 时,它在项目资源管理器中分别显示了我的 GUI“.class”文件和“.form”文件,并且我无法在“Source”和“Source”之间切换“设计”。我还注意到,通常不可编辑的生成代码现在可以编辑。

PS 我能够很好地创建一个新框架,并且设计编辑器仍然可以使用新框架

Lately, I've been working on a project in NetBeans using the GUI editor that's built in. Before I noticed that it generated an XML ".form" file that didn't appear in the Project Explorer Pane which makes sense. Earlier I was working on the form in the "Design" tab when it notified me about 15 updates. I just updated without reading anything which was probably a bad idea but when I restarted the IDE, it showed my GUI ".class" file and ".form" file separately in the Project Explorer and I couldn't switch between "Source" and "Design". I also noticed that the generated code that was usually not editable was now editable.

P.S. I'm able to create a new frame just fine and the design editor still works with new frame

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

时光礼记 2024-11-02 19:58:33

我遇到了同样的问题并且已经解决了。

我认为这个问题的关键是Netbeans中JFrame的特定插件在更新后不活跃,所以我们只需要激活它们。实现这一点的最简单方法是创建一个新的 JFrame 类,因此在此过程中,NetBeans 可以为我们激活所有相关插件。最后,重新启动NetBeans,然后一切就OK了。

非常感谢大家在这种情况下给我一些想法和线索:)

I have encounter the same problem and I have solved it.

The key in this problem, I think, is particular plugins for JFrame in Netbeans are not active after updating, so we only need to activate them. The easiest way to achieve this is create a new JFrame class, so in this progress, NetBeans can activate all relevant plugins for us. Finally, restart NetBeans, then everything would be fine.

Thank you very much for all of you that you give me some idea and clues in this situation:)

廻憶裏菂餘溫 2024-11-02 19:58:33

由于解决了类似的问题,我进行了这个讨论 关于内部的受保护块 表单 Java 源文件< /em>。我不确定这与你的情况有关,但它可能会帮助你康复。

Work on a similar problem led me to this discussion concerning Guarded blocks inside form Java source file. I'm not sure it's related to your situation, but it may help you recover.

溇涏 2024-11-02 19:58:33

如果您尝试恢复表单支持 xml 的丢失状态,我不知道该告诉您什么。

这发生在我身上,但我倾向于高度组件化表单(将表单分解成小块),这使得这不是什么大问题。您尝试过 NetBeans 论坛吗?您可能会在那里获得更好的运气:

http://forums.netbeans.org/

If you are trying to recover the lost state of the backing xml for the form I don't know what to tell you.

This has happened to me, but I tend to highly componentize the forms (break up the forms into little pieces), which makes this not such a big deal. Have you tried the NetBeans forums? You might get better luck there:

http://forums.netbeans.org/

感悟人生的甜 2024-11-02 19:58:33

没关系,简单的解决方案。

经过大量修改后,我最终决定重新启动 IDE,这是我应该首先考虑的。 Java SE 插件一定是崩溃了或者什么的,无论如何它已经修复了。

感谢您的帮助!

Nevermind, simple solution.

I finally decided that, after plenty of tinkering, to restart the IDE which I should have though of first. The Java SE Plugin must have crashed or something, anyway it's fixed.

Thanks for the help!

怪我太投入 2024-11-02 19:58:33

或者只需右键单击相应的 .form 文件并选择打开。设计选项卡/编辑器重新建立。

Or just right click on the corresponding .form file and select open. The Design tab/editor reestablishes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文