*/
public static JFrame getPaletteWindow(Layer layer, ComponentListener cl) {
Component layerGUI = getLayerGUIComponent(layer);
JPanel dismissBox = new JPanel();
dismissBox.setLayout(new BoxLayout(dismissBox, BoxLayout.X_AXIS));
dismissBox.setAlignmentX(Component.LEFT_ALIGNMENT);
dismissBox.setAlignmentY(Component.BOTTOM_ALIGNMENT);
dismissBox.add(Box.createHorizontalGlue());
JButton dismiss = new JButton("Close");
dismissBox.add(dismiss);
dismissBox.add(Box.createHorizontalGlue());
JPanel pane = new JPanel();
pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.setAlignmentX(Component.CENTER_ALIGNMENT);
pane.setAlignmentY(Component.BOTTOM_ALIGNMENT);
pane.add(layerGUI);
pane.add(dismissBox);