Galera não estou conseguindo adicionar esse grafico em um painel no meu jFrame
mas quando uso o this.setContentPane(chartPanel); ele adiciona no frame o grafico mas
eu preciso que seja adicionado no jpanel do jframe
JFreeChart barChart = null;
try {
barChart = ChartFactory.createBarChart(
chartTitle,
"Dias",
"Valores",
createDataset(),
PlotOrientation.VERTICAL,
true, true, false);
} catch (Exception ex) {
Logger.getLogger(BarChart_AWT1.class.getName()).log(Level.SEVERE, null, ex);
}
ChartPanel chartPanel = new ChartPanel(barChart);
chartPanel.setPreferredSize(new java.awt.Dimension(800, 450));
setContentPane(chartPanel);
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
//this.setContentPane(chartPanel);
jPanel1.add(chartPanel);
jPanel1.repaint();
jPanel1.revalidate();