JPanel pal;
    protected JPanel getGraphicPalette(final GraphicBase obj, final String title) {        JPanel pal;        final JComboBox jcb;        final JFrame jframe;        final JRootPane main;        final JPanel parent;        parent = PaletteHelper.createVerticalPanel(title);        jframe = new JFrame();        main = jframe.getRootPane();        // different controls for different render types        jcb = new JComboBox();        jcb.addItem("LatLon");// indices correspond to LineType.java        jcb.addItem("XY");        jcb.addItem("Offset");        jcb.setSelectedIndex(obj.rt - 1);        jcb.addActionListener(new ActionListener() {            public void actionPerformed(ActionEvent e) {                obj.setRender(jcb);                switch (obj.rt) {                case OMGraphic.RENDERTYPE_LATLON:                    jframe.setTitle(title + " - LatLon");                    main.getContentPane().removeAll();                    main.getContentPane().add(obj.getGUI());                    jframe.pack();                    jframe.setVisible(true);                    break;                case OMGraphic.RENDERTYPE_XY:                    jframe.setTitle(title + " - XY");                    main.getContentPane().removeAll();                    main.getContentPane().add(obj.getGUI());                    jframe.pack();                    jframe.setVisible(true);                    break;                case OMGraphic.RENDERTYPE_OFFSET:                    jframe.setTitle(title + " - XY Offset");                    main.getContentPane().removeAll();                    main.getContentPane().add(obj.getGUI());                    jframe.pack();                    jframe.setVisible(true);                    break;                default:                    System.err.println("ARRRR!");                    break;                }            }        });        parent.add(jcb);        return parent;    }