Integrating java charting library

1
I am trying to integrate the Java charting library JFree charts into my Mendix application. It uses two libraries which I have placed in the userlib folder and configured the build path to access these libraries. I was wondering if the import statements I used will be written over every time I deploy the application? Also,creating the charts requires me to create a class separate from the class that allows you to extend your application using Java. My question is where do I place this class, I can't place it in the same file as the other class, so where would I place this second file so that other class can access its members and the file is not over written each time the application is deployed? Any suggestions will be greatly appreciated, thank you. A portion of the class is shown below: public class PieChart extends JFrame{ private static final long serialVersionUID = 1L; public PieChart(String applicationTitle, String chartTitle) throws Exception { super(applicationTitle); // This will create the dataset PieDataset dataset = createDataset(); // based on the dataset we create the chart JFreeChart chart = createChart(dataset, chartTitle); // we put the chart into a panel ChartPanel chartPanel = new ChartPanel(chart); // default size chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); // add it to our application setContentPane(chartPanel); } }
asked
1 answers
1

Monique,

The import statements will not be altered on deploying your app. Adding the second class can be done by adding a directory to the dir you class is in and create the new class in this new directory. Check your build path after deploying for eclipse to see that the classes are added and if not manually add the class to your build path in eclipse.

answered