dshrenik
asked on
JFreeChart: Set chart size
I am adding a JFreeChart to ChartPanel, and then adding the ChartPanel to a JPanel.
I want to control the size of the chart.
Please let me know how I can do that. If possible, please provide some sample code. Thanks!
I want to control the size of the chart.
Please let me know how I can do that. If possible, please provide some sample code. Thanks!
ASKER
set size did not do the trick.
Can you tell how I can set the layout?
Can you tell how I can set the layout?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You just need to devise the way you want your elemsnt to sit in your windowand then select appropriate layout
setSize() which exist for JPanel and JComponent
Howevere in normal applications you normally avoid set size for JPanels - it is better to devise layourt of your
window (JFrame or something) so that your panels have the size you want