paint

paint();                              (Form)

paint(control: control-type input);   (Control)

The paint event occurs when:

Use a paint event if you need to coordinate the painting of a form or control with some external activity. The paint event is also invoked when the refresh and refreshNow methods are used. Using a refresh method in a resize event forces repainting of the entire object every time a user resizes the form.

The paint event is not called if the form or control has the autoRedraw property set to true or when running a web‑enabled Jade application, as no Jade forms are created and displayed.

Java generates a paint request for the smallest rectangle that encloses the required paint areas. GUI changes in a paint event therefore cause continuous painting if the resulting paint rectangle includes the same window again.

Using a paint event for certain tasks can cause a cascading event. In general, avoid using a paint event for the following.

A resize event may be more appropriate for some of these tasks.

The paint event is called after the normal painting of the form or control has completed, allowing this image to be drawn on.

It is not possible to handle the painting of transparent controls in the correct zOrder when it involves a mixture of controls that can be directly painted by Jade and those that can only be painted separately by Windows.

As a result, transparent sibling controls are always painted before any JadeRichText, MultiMedia, JadeXamlControl, Ocx, OleControl, JadeDotNetVisualComponent, or ActiveXControl controls, regardless of their zOrder settings.