Netbeans: using GUI Builder on regular Java class file

前端 未结 3 481
梦如初夏
梦如初夏 2021-01-21 06:02

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.

What is the ne

3条回答
  •  说谎
    说谎 (楼主)
    2021-01-21 06:31

    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.

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

    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

提交回复
热议问题