Implementing the Widget
The widget class must extend from Widget or one of its derived classes. There are several skeletal implementations available. The skeletal implementations are shown in the image below.
For the purposes of this tutorial, we will use Widget. Before we proceed, we need to decide the name of the widget class. Let’s assume com.foo.SimpleLabel.