GWT Custom Widget
Google Web Toolkit offers a variety of ways for creating custom widgets. The easiest way is to create composite widgets by grouping existing basic widgets and adding some interaction logic to them.
To create Custom Widget it has three general concepts to be implemented for creating custom widget which are as follows:
Building Composite Widgets
To create composite widget it should extend Composite Class. A composite is a specialized widget that can contain another component. It behaves as if it were its contained widget. On creating composite widget we can combine groups of existing widgets into a composite that is itself a reusable widget.
Create Java Code for new widget
Widget is written in java language under package com.google.gwt.user.client.ui. The source code is in gwt-user.jar. It is a complicated method to create a basic widget in this method. Many of the basic widgets are written this way, such as Button and TextBox.
GWT Custom Widget Example