MxDesignPanel

Class  com.gp.api.swing.designer.MxDesignPanel can be used to edit instances of MxComponent. MxDesignPanel is a subclass of JSplitPane with the following additional methods:

public void setTarget(MxComponent target)
Sets the component to be edited
public void setTarget(MxComponent target)
Returns the current component
public MxDesignTable getDesignTable()
Returns an instance of MxDesignTable class used by this panel
public static void initGallery()
Starts an asynchronous thread that builds charts gallery from the contents of "gallery" folder of the current directory. Gallery folder and its subfolders are scanned for WebCharts3D project files (*.wcp) and the images of these charts are built.

If you are planning to use gallery, you might want to call this method on application startup to avoid delays when opening gallery dialog for the first time.
public void showGallery()
Displays gallery dialog with charts templates and sets current chart to the selected one.

For example the following code can be used to edit a pie chart:

     import com.gp.api.styles.chart.MxPieChartStyle;  
    import com.gp.api.model.MxSampleChartModel;
    ...
     MxDesignPanel panel = new MxDesignPanel();    
// create a new instance of MxDesignPanel 
     MxComponent c = new MxComponent();            
// create a new chart component 
     c.setSize(200,100);                           
// set component's size 
     c.setStyle(new MxPieChartStyle());            
// set component's style 
     c.setModel(new MxSampleChartModel(2,3));      
// set component's model 
     panel.setTarget(c);                           
// set designer's target 
     panel.setSize(600,400);                       
// set designer's size 
     panel.setDividerLocation(400);                
// set designer's location 
     ...
    frame.getContentPane().add(panel);
    frame.open();