Introduction | Your first interface | Building a model | Advanced features | Resources

3. Building a model

In this part of the tutorial you will learn how to create the Java models from which interfaces are built. The Model Wizard takes away the work of creating the structure of your model files, but you will also need to have a text editor and a java compiler installed on your computer to finish the model (suggested downloads are available in 5.1 Useful links). You will learn how to create a model, add variables and actions, and how to compile and use the model. An understanding of the Java programming language is necessary to be able to complete this section of the tutorial.

You are going to create the model for the Ohm's Law example used in Building your first interface. If you have not completed that part of the tutorial, it is suggested that you look at 2.2 accessing model variables with objects, which briefly describes this model.

This part consists of the following four steps:

3.1 Creating a model

How to start the Model Wizard and how to structure your model files.

3.2 Adding model properties

How to register model properties so that they can be accessed by the Interface Builder and displayed on an interface.

3.3 Adding actions

How register additional actions and define the methods to perform these actions.

3.4 Finishing the model

How to add the final code to the model, compile it, and import the model into the Interface Builder.