To convert from AWT to AFC, instances of java.awt.Canvas should be transformed into instances of com.ms.ui.UICanvas.
Canvas extends Component: be sure to see its changes.
UICanvas provides no real advantage over Canvas: the advantages come from UIStateComponent (which UICanvas extends) and UIComponent (which UIStateComponent extends). Like other UIComponents, you can set IDs to UICanvas items and place them in combo boxes, buttons, etc.
The only change necessary is to change all instances of
Canvas()
to
UICanvas().