while (it.hasNext()) { Layer layer = (Layer) it.next(); Component layerGUI = layer.getGUI(); if (layerGUI != null) { tabs.addTab(layer.getName(), layerGUI); } } panel.add(tabs); } setPaletteTab(targetIndex); return panel;
while (it.hasNext()) { Layer layer = (Layer) it.next(); Component layerGUI = layer.getGUI(); if (layerGUI != null) { tabs.addTab(layer.getName(), layerGUI); } else { tabs.addTab(layer.getName(), getEmptyGUIFiller(layer)); } } panel.add(tabs); } setPaletteTab(targetIndex); return panel;
    public Component getGUI() {	if (panel == null) {	    Iterator it = getLayers().iterator();	    panel = new JPanel();	    tabs = new JTabbedPane(); 	    // bfPanel still needs controls for controlling scales,  	    // etc, showing which one is showing, etc., as well as 	    // some indication as which layer is currently active.	    JPanel bfPanel = new JPanel();	    GridBagLayout gridbag = new GridBagLayout();	    GridBagConstraints c = new GridBagConstraints();	    bfPanel.setLayout(gridbag);	    tabs.addTab("Scale Filter Controls", bfPanel);	    JButton gotoButton = new JButton("Go to Active Layer Tab");	    gotoButton.addActionListener(new ActionListener() {		    public void actionPerformed(ActionEvent ae) {			setPaletteTab(targetIndex);		    }		});	    c.gridy = 0;	    gridbag.setConstraints(gotoButton, c);	    bfPanel.add(gotoButton);	    while (it.hasNext()) {		Layer layer = (Layer) it.next();		Component layerGUI = layer.getGUI();		if (layerGUI != null) {		    tabs.addTab(layer.getName(), layerGUI);		}	    }	    panel.add(tabs);	}	setPaletteTab(targetIndex);	return panel;    }