As you work with the IDE to create and change user interfaces, properties, and so on, Java source files are automatically generated and updated in the Source Editor. Code that is automatically generated by the Form Editor appears in blue-shaded areas of guarded text that you cannot edit directly, although you can affect the way such code is generated.
You can type in your own code at any time in the nonguarded areas of the Source Editor. The Source Editor has many shortcuts to make this easier, including automatic formatting and automatic text completion with macros, abbreviations, and the code completion and word match features.
In addition to these shortcuts (which you can read about in the links below), the Source Editor provides shortcuts for adding new Java elements with a minimum of typing.
To generate the basic structure for a new class or interface:
To generate text for a new initializer, field, constructor, method, inner class, or inner interface:
![]() |
When you generate Java text with the Add item on the contextual menu, you might need to scroll to find your new text. It is normally added in an appropriate place after existing Java objects. |
See also | |
---|---|
Working With Source Code
Guarded Text Formatting Code Using Code Completion Using Macros and Abbreviations Using the Word Match Feature |