};
// Create two models and pass them the shared layers.
Model modelForWindowA = new BasicModel();
modelForWindowA.setGlobe(earth);
modelForWindowA.setLayers(new LayerList(layers));
// Create two frames and give each their own model.
GfrCanvasFrame frameA = new GfrCanvasFrame(null, modelForWindowA, "Frame A");
Model modelForWindowB = new BasicModel();
modelForWindowB.setGlobe(earth);
modelForWindowB.setLayers(new LayerList(layers));
// When creating the second frame, specify resource sharing with the first one.
GfrCanvasFrame frameB = new GfrCanvasFrame(frameA.getWwd(), modelForWindowB, "Frame B");
// Create two models and pass them the shared layers.
Model modelForWindowC = new BasicModel();
modelForWindowC.setGlobe(earth);
modelForWindowC.setLayers(new LayerList(layers));
// Create two frames and give each their own model.
GfrCanvasFrame frameC = new GfrCanvasFrame(null, modelForWindowC, "Frame C");
frameA.addSecondaryViewer(frameB);