Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
426 views
in Technique[技术] by (71.8m points)

java - NetBeans Gui Builder on existing code

I use Eclipse from time to time to maintain some java code for my employer and to hack locally some OSS to my needs.

While I did not upgraded my Eclipse distro since the 3.5 release, I was recently amazed by the WindowBuilder feature when I upgraded to 3.7. WindowBuilder has the interesting possibility to parse some existing code and render the corresponding GUI. When it is not automagical, I can try to force the rendering by a right-click / open with / WindowBuilder editor.

I also recently decided to test the NetBeans IDE (latest release available at this time : 7.0.1) that I found visually appealing and that I guess it should be less bloated than my Eclipse + a bunch of plugins (NSIS integration + mylyn + CDT + ...) for just some java development stricto sensu.

My problem is that for some code (in my test case, it is on the jomic project) NetBeans GUI Builder makes no rendering of a (quite simple) Jframe derived class, and I did not found if / how to tell it to try. The same class can be rendered by WindowBuilder if I open with / WindowBuilder editor.

Is there a trick that I can use to render the GUI code ? Thanks for helping a NetBeans rookie :)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The GUI Builder only works on code that the GUI Builder made.

NetBeans form editor is not able to regenerate a missing .form file for GUI classes, or to generate a .form file for GUI classes not originally created in NetBeans.

However, there are some external tools trying to address this problem, e.g. FormGenerator. Check contrib.netbeans.org for newest version. Source


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...