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. All automatically generated code appears in blue shaded areas of guarded text that you cannot edit directly, although you can affect the way it is generated.
You can type in your own code at any time in the non-guarded areas of the Source Editor. The Source Editor has many shortcuts to make this easier, including automatic formatting and automatic text completion with 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 New option on the contextual menu, you may need to scroll to find your new text. It is normally added in an appropriate place after existing Java objects. |
See also | |
---|---|
Using Java and HTML Completion
Using the Word Match Feature Working With Source Code Guarded Text |