Using Class Builder, you can easily manage the member variables defined by your class. Class Builder assists you in adding a new member variable, adding a member variable based on an existing definition, modifying a member variable, and deleting a member variable.
To display the member variables in your class
Start Class Builder and make sure your class is selected by Class Builder. For information on how to do this, see Starting Class Builder.
Click the Member Variables tab in Class Builder. The Member Variables list displays the member variables that are currently defined by your class. (Depending on the current settings for Class Builder, this list may be filtered. For more information, see Setting Class Builder Options.)
To add a new member variable
Click Add. In the Add Member Variable dialog box, enter the information for the member variable:
Enter the name of the member variable in the Member Variable Name box.
Select a data type from the Data Type drop-down list or enter your own data type.
Select an access modifier from the Access drop-down list. Member variables can be declared as public, protected, private, or default (package).
To initialize the member variable, enter a value in the Initial Value box.
To insert Javadoc comments for the member variable, enter the comment text in the Javadoc comment box.
Click Add.
To add a member variable based on an existing definition
Select a member variable from the Member Variables list and click Clone. The Clone Member Variable dialog box displays the information for the selected member variable, which is the basis for the new member variable.
Replace the name in the Member Variable Name box with the name of the new member variable. Modify the remaining selections as needed.
Click Add.
To modify an existing member variable definition
Select the member variable from the Member Variables list and click Modify.
In the Modify Member Variable dialog box, modify the information for the member variable and then click Modify.
To delete a member variable that has already been declared
Select the member variable from the Member Variables list and click Delete.