To convert from AWT to AFC, instances of java.awt.MenuComponent should be transformed into instances of com.ms.ui.UIComponent.
In AFC, the classes that work with menus (UIMenuList, UIMenuButton, and UIMenuItem) all derive from UIComponent: they do not need a special base class like MenuComponent. UIComponent provides the functionality of MenuComponent.
Some methods in java.awt.MenuComponent are not directly supported in com.ms.ui.UIComponent. Those methods and suggested changes are described here.
AWT Code/Suggested AFC Code | Comments |
getPeer() (no suggestions) |
Deprecated in AWT 1.1 |
dispatchEvent(AWTEvent) (no suggestions) |
|
paramString() getName(), etc. |
Use the getXXX function that provides the information you need. |
processEvent(AWTEvent) (no suggestions) |