myChartPanel.setMinimumDrawHeight(700); myChartPanel.setMinimumDrawWidth(540); myChartPanel.setPreferredSize(new java.awt.Dimension(640, 480));
myChartPanel.setMinimumDrawHeight(640); myChartPanel.setMinimumDrawWidth(480); myChartPanel.setPreferredSize(new java.awt.Dimension(300, 200));
    private void buildFullGUI() {        //Chart Panel        setLayout(new BorderLayout());        XYSeries series = new XYSeries("Stroma Conditions");        myData = new XYSeriesCollection(myProtonsSeries);        myData.addSeries(myNADPSeries);        myData.addSeries(myADPSeries);        myData.addSeries(myPhosphateSeries);        myData.addSeries(myATPSeries);        myData.addSeries(myNADPHSeries);                myChart = ChartFactory.createLineXYChart("Stroma Conditions",                "Simulation Iterations", "Quantity", myData, true, true, false);        XYPlot myPlot = myChart.getXYPlot();        XYItemRenderer renderer = myPlot.getRenderer();        renderer.setSeriesPaint(0, Color.RED);        renderer.setSeriesPaint(1, Color.ORANGE);        renderer.setSeriesPaint(2, Color.GREEN);        renderer.setSeriesPaint(3, Color.PINK);        renderer.setSeriesPaint(4, Color.MAGENTA);        renderer.setSeriesPaint(5, Color.BLUE);        myPlot.getDomainAxis().setStandardTickUnits(                NumberAxis.createIntegerTickUnits());        myPlot.getRangeAxis().setStandardTickUnits(                NumberAxis.createIntegerTickUnits());        myChartPanel = new ChartPanel(myChart);        myChartPanel.setMinimumDrawHeight(700);        myChartPanel.setMinimumDrawWidth(540);        myChartPanel.setPreferredSize(new java.awt.Dimension(640, 480));        myChart.setBackgroundPaint(myChartPanel.getBackground());        setLayout(new BorderLayout());        add(myChartPanel, BorderLayout.CENTER);    }