How is the graphical user interface implemented in the software

Design of the layout

Goal setting

The user interface for the program should be designed in such a way that a user can easily find his way around here. For this purpose, components should be grouped to structure the layout.

Container components as GUI objects

The following test program shows how to use objects of the class as containers for other GUI objects.

A kind of frame is used here to group related components. This frame is color-coded in this test program.

Objects of the class serve as containers for other GUI objects. They are often used to group components of the user interface. With the help of the attribute, a nesting of components is created, which is shown on the user interface through a containment relationship.

The program shown above results in the following nesting of components:

  • is of .
  • is from, and.

The container objects of the classes, like window objects of the class, define pixel coordinate systems with the help of which the included objects are precisely placed.

The following figure illustrates these coordinate systems as an example.

Task 1

In the test program, move the frame to another place on the screen. Also move the components within the frame.

exercise 2

Change the layout of the chuck-a-luck program according to your ideas. Try to structure the user interface as clearly as possible.