Adding a ChartPanel to JPanel
问题 I've got some not working code here: XYSeriesCollection dataset = new XYSeriesCollection(); dataset.addSeries(series); JFreeChart chart = ChartFactory.createXYLineChart(null, null, null, dataset, PlotOrientation.HORIZONTAL, true, true, true); ChartPanel chartpanel = new ChartPanel(chart); chartpanel.setDomainZoomable(true); jPanel4.setLayout(new BorderLayout()); jPanel4.add(chartpanel, BorderLayout.NORTH); So the problem is that the jPanel4 with a chart is not visible. When I add my