next up previous contents index
Next: ClassesComponents, and Up: Getting Started Previous: Compiling DJ programs

The main panel

When having a DJ program compiled, we can give the system six parameters that specify the sizes of the main panel and the layout area.

The values given to the parameters are all in pixels. The size of the layout area for sub-panels is:
    (w - lm - rm)*(h - tm - bm)
If no value is given to a parameter, then the default value will be used. The default value for w and h is 500 pixels, and the default value for the margins is 0.                  

The main panel forms a coordinate system ranging from (0, 0) to (w - 1, h - 1). The X coordinate increases to the right, and the Y coordinate increases downward. So, the left upper corner of the main panel is (0, 0) and the left upper corner of the layout area is (lm, tm).

For example, to have the HelloWorld button shown in a panel, we compile the program with the following command:

       dj -w 100 -h 100 HelloWorld



Neng-Fa ZHOU
Sat Apr 18 16:14:29 JST 1998