import java.awt.*; import java.util.*; import javax.swing.*; //this is the Implementor class //that decides which class to return public class listBridge extends Bridger { public static final int LIST=1, TABLE=2, TREE=3; protected visList list; public listBridge(int type) { setLayout(new BorderLayout()); switch (type) { case LIST: list = new productList(); add("Center", (JComponent)list); break; case TABLE: list = new productTable(); add("Center", (JComponent)list); break; case TREE: list = new productTree(); add("Center", (JComponent)list); break; default: list = null; } } public void addData(Vector v) { for(int i=0; i