*/
public class OSXorWindowsFactory2 {
public static void main(String[] args) {
GUIFactory2 aFactory = GUIFactoryChoice2.getFactory();
System.out.println("Using factory " + aFactory
+ " to construct aButton");
Button aButton = aFactory.createButton();
aButton.setCaption("Push a");
aButton.paint();
System.out.println("\nUsing factory " + aFactory
+ " to construct aMenu");
Menu aMenu = aFactory.createMenu();
aMenu.setCaption("Menu a");
aMenu.display();
GUIFactory2 bFactory = GUIFactoryChoice2.getFactory();
System.out.println("\nUsing factory " + bFactory
+ " to construct bButton");
Button bButton = bFactory.createButton();
bButton.setCaption("Push b");
bButton.paint();
System.out.println("\nUsing factory " + bFactory
+ " to construct bMenu");
Menu bMenu = bFactory.createMenu();
bMenu.setCaption("Menu b");
bMenu.display();
GUIFactory3 cFactory = GUIFactoryChoice3.getFactory();
System.out.println("\nUsing factory " + cFactory