Like in SWT, you can also create custom widgets to extend the RAP widget set to your needs. Examples range from simple compositions of existing controls to complex widgets such as custom tab folders, or animated graphs and charts.
There are different types of custom widgets which will be described below.
But no matter which type of custom widget you implement, you will end up with a RAP widget
that has an SWT-like API and inherits some methods from an SWT super class.
Therefore you should make yourself familiar with some important rules of SWT before you get
We highly recommend to read this article by the creators of SWT. 
The RAP Wiki may cover more recent issues regarding custom widgets.
These types differ a lot with regard to the features they support, the dependency on a certain platform, and also the effort and knowledge it takes to create them.
These are the simplest ones. Compound widgets are compositions of existing SWT/RAP widgets. These widgets have to extend Composite. There is no fundamental difference between SWT and RAP for compound widgets. Everything that is said about compound widgets in  also applies to RAP. If you want to make your compound widget visually distinct, use a custom variants to style the composite and its children.
These are also simple in design. Sometimes you might want a widget that completely draws itself. This can be done by extending Canvas. For writing this kind of widgets, you can also follow . Please note that the drawing capabilities of RAP are limited compared to SWT. Especially in Internet Explorer 7 and 8, the performance degrades with the number of drawing operations.
Hint: If performance becomes an issue and your custom widgets has layers or areas that need to be redrawn less often than others, you should consider combining this with the compound approach. Either stack multiple canvases on top of each other (use SWT.INHERIT_FORCE on the parent background to make their background transparent), or put them in any layout as you would other widgets. This can reduce the number of operations by calling "redraw" only on the canvases that need to be updated.
These can still be rather simple.
Browser widget lets you place any HTML into your application.
See Embedding Web-Components.
ClientScripting is a RAP Incubator component that allows adding client-side behavior to existing RAP widgets. When your custom-widget can graphically be represented by one or more existing SWT/RAP-widgets, but cannot be reasonably well implemented as a compound widget because of the latency of the HTTP-requests involved, ClientScripting is often the ideal solution. It can also help in some cases where certain SWT events are not implemented in RAP (MouseEnter/MouseExit), or are limited compared to SWT (Verify). ClientScripting is not to be confused with developing a Remote-API based custom widget. While it also runs partially on the client, the difference is that ClientScripting provides an SWT-like API and does not require/allow you to implement any client-server communication.
RAP 2.0 introduced the "Remote-API" which provides a simple way to write custom widgets
that function with the same efficiency as RAP/RWT core widgets. Both sides can send messages
to the other by using a
Remote Object. While the server
the custom widget code, the client RemoteObject
provided by the framework.
To process messages, the server side
on the RemoteObject
instance, while the client registers a
globally. More detailed information may be found in the RAP Wiki .