Using both Eclipse and NetBeans on the same project

前端 未结 8 1045
忘掉有多难
忘掉有多难 2021-01-31 15:42

Eclipse is a really great editor, which I prefer to use, but the GUI design tools for Eclipse are lacking. On the other hand, NetBeans works really well for GUI design.

8条回答
  •  野的像风
    2021-01-31 15:55

    A few gotchas:

    • If you try to use both without any plugins/integration, you must be careful not to edit the regions marked "DO NOT EDIT" as Netbeans will overwrite code in those sections quite frequently.
    • You should use the "Customize..." command to add custom init code for components.
    • Adding/creating new components on a form using Java code will not be reflected in the GUI editor.
    • Developers have to be discouraged from going into the code and adding swing customizations, effectively bypassing the GUI editor.

    Another tip is that you can create Java Beans using Eclipse and drag-and-drop them into the Matisse editor. This allows you to create a custom GUI component or a non-GUI component (models, listeners, etc) and add it to a Matisse form. With listeners and models, you can specify a component to use an instance of your custom listener/model instead of the default behavior. You can also drag-and-drop in custom GUI components and manipulate them like any other GUI widget.

提交回复
热议问题