I want to display multiple charts on one page. I am using a JPanel with GridBagLayout.
Is it possible to display multiple charts per page?
Can I add multiple ChartPanel(s) in a JPanel?
Thanks.
cannot add chartpanel to jpanel?
ChartPanel itself is a extension of JPanel.
Just treat it as a JPanel
Just treat it as a JPanel

Code: Select all
public class Test extends JFrame
{
Test()
{
.....
ChartPanel panel1 = new ChartPanel(chart1);
ChartPanel panel2 = new ChartPanel(chart2);
panel1.setSize(400, 400);
panel2.setSize(400, 400);
add(panel1);
add(panel2);
pack();
setVisible(true);
}
}
Strafing for excellence