You can see a panel as a group of widgets.
There are a lot of similarities with the Gui, so you can make use of the add functions, you can set the global font of the panel, and you can call uncheckRadioButtons to uncheck all the radio buttons that are part of the panel.
The panel was actually created for the radio buttons. Only one radio button can be checked at a given time, but suppose you would want multiple groups of radio buttons. You will need a panel to accomplish that. Lower on this page you will find the example code on how to do it.
All widgets inside the panel will have relative coordinates. If you set the panel to position (200,50) and you add a picture in it with position (50,50) then the picture will (as expected) be drawn at position (250,100) on the screen.
Also be aware that even though your panel might have a transparent background, the widgets behind the panel will not be clickable.
Example code on how to create radio button groups:
The panel can also be used to create multiple forms. You could just add all widgets to the gui and hide some of them when you don't need them, but isn't advisable if you have a lot of widgets.
Instead you could simply add the widgets to a panel and display one panel at a time.
So all widgets are loaded in the beginning of the program, but only the current form will be visible.
Example code on how to use forms: