To convert from AWT to AFC, instances of java.awt.GridLayout should be transformed into instances of com.ms.ui.UIGridLayout.
GridLayout implements LayoutManager: be sure to see its changes.
AFC provides UIGridLayout as a replacement for AWT's GridLayout in the improved UILayoutManager. The changes here are minimal--the advantages come from the better layout manager. One advantage is that you can add and remove layout components from multiple containers in one method.
All methods (except those discussed below) in GridLayout are supported in UIGridLayout. The constructors GridLayout() need to be changed to UIGridLayout().
Some methods in java.awt.GridLayout are not directly supported in com.ms.ui.UIGridLayout. Those methods and suggested changes are described here.
AWT Code/Suggested AFC Code | Comments |
addLayoutComponent(String,
Component) addLayoutComponent(IUIContainer, IUIComponent, Object) |
You need to specify a container for the component. |
removeLayoutComponent(Component) (Container).remove(UIComponent) |
Use this method on the container that is using this layout manager. |
getColumns() (no suggestions) |
|
getRows() (no suggestions) |
|
setColumns(int) (no suggestions) |
|
setRows(int) (no suggestions) |