Netbeans:在常规Java类文件上使用GUI Builder [英] Netbeans: using GUI Builder on regular Java class file

查看:161
本文介绍了Netbeans:在常规Java类文件上使用GUI Builder的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Netbeans.创建Java类时,有时我想将其更改为GUI组件,以便可以使用GUI Builder对其进行可视化编辑.

I'm using Netbeans. When I create a Java class, I sometimes want to change it to be a GUI component so that I can visually edit it using the GUI Builder.

将常规Java类转换为GUI组件,以便Netbeans识别它并允许我使用GUI Builder的必要步骤是什么? (即在源代码"和设计"之间切换)

What is the necessary step to transform a regular Java class to a GUI component so that Netbeans would recognize it and allow me to use GUI Builder ? (i.e. switch between Source and Design)

推荐答案

NetBeans的Gui生成器Matisse处理与源文件相邻的.form xml文件. Matisse创建并维护.form文件,代码生成器在java源代码中创建/更新方法以反映对表单的更改.

NetBeans' Gui builder, Matisse, works off a .form xml file located adjacent to the source file. Matisse creates and maintains the .form file and the code generator creates/updates methods in the java source to reflect changes to the form.

不幸的是,NetBeans中不支持自由格式的GUI构建.

Unfortunately, there is no support in NetBeans for free-form GUI construction.

我所看到的最接近的是FormGenerator.这是NetBeans的一个贡献模块,它向.java文件添加了右键单击操作,该操作将尝试从.java源代码生成.form文件.它非常有限,但是总比没有好.如果您遵循Matisse所采用的编码风格,则效果最佳.

The closest I've seen is FormGenerator. It's a contributed NetBeans module that adds a right click action to .java files that will attempt to generate a .form file from the .java source. It's very limited, but it's better than nothing. It works best if you've followed the coding style employed by Matisse.

http://netbeans.org/projects/contrib/downloads/download /Readme.txt http://netbeans.org/projects/contrib/downloads/download/FormGeneratorModule. zip

这篇关于Netbeans:在常规Java类文件上使用GUI Builder的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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