Specifying Component Behavior and Appearance


You can use the Properties window to set the behavior and appearance of components that you have added to a form. The Properties window displays the properties of the component that is selected in the Inspector or the Form Editor. The properties come in three categories:

  • Properties. A configurable list of characteristics for the component. Technically speaking, these are the JavaBeans properties, layout constraints, and accessibility properties for the component.

  • Events. A list of event listeners that you can attach to a component. You can specify event listeners here (or remove them here) or use the Connection wizard. See Generating Event Listening and Handling Methods later in this chapter.

  • Code. Some NetBeans IDE-specific properties you can use to customize the way the code is generated. See Customizing Generated Code later in this chapter.

To edit component properties:

  1. Select the property category by clicking the appropriate button at the top of the Properties window (Properties, Events, or Code).

  2. Edit the component's properties in the Properties window by selecting the property and entering the desired value.

  3. If a property has a button, you can click it to open a special property editor that enables you to modify the property and the initialization code generated for it.

  4. In the property editor, use the Select Mode combo box to choose each custom editor for the property and make the necessary changes.

The Properties window lists any properties that have been changed from their default values in bold. Many components come with preset properties when you place them in a form. Often, these are the most important properties for the component.




NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
NetBeans IDE Field Guide(c) Developing Desktop, Web, Enterprise, and Mobile Applications
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 279

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net