[英]Show NetBeans design view of copied code
I'm total newbie in Swing. 我是Swing的新手。 I created new project and there I created new JFrame Form.
我创建了新项目,并在那里创建了新的JFrame Form。 Into this file I copied some tutorial code of GUI(Chess board).
在此文件中,我复制了一些GUI(棋盘)的教程代码。 Everything works, i can build and run.
一切正常,我可以构建并运行。 The problem is when I try to left-click on the name of the file and choose Editors->Design it shows me empty Frame.
问题是当我尝试在文件名上单击鼠标左键,然后选择“编辑器”->“设计”时,显示为空框架。 Is there any way how to fix this(it's more intuitive to operate with design view then in code)
有什么方法可以解决此问题(在代码中使用设计视图进行操作更直观)
I understand what you mean. 我明白你的意思。 Besides the (FormName).java file, you also need the original (FormName).form file to be copied into the src folder.
除了(FormName).java文件,您还需要将原始(FormName).form文件复制到src文件夹中。 Without it, there is no way for the IDE to translate the code to the design enviroment.
没有它,IDE将无法将代码转换到设计环境。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.