I can\'t seem to manipulate the chart itself. I can\'t change the size and chartPanel = createChartPanel();
keeps rewriting into chartPanel = javax.swing.pan
Have you added your panel chartPanel
to a JFrame
?
If not, try this:
JFrame jf = new JFrame("Chart");
jf.add(chartPanel);
jf.pack();
jf.setSize(frame_width,frame_height);
jf.setVisible(true);
As you can see from code, you can edit the size of the frame in which the chartPanel
is contained, with jf.setSize(frame_width,frame_height);
.
You can just take a look to these API:
JFrame API : http://download.oracle.com/javase/6/docs/api/javax/swing/JFrame.html
JPanel API : http://download.oracle.com/javase/6/docs/api/javax/swing/JPanel.html
You don't have to worry about your chart size, set your Panel's layout to GridBagLayout that should help.