Search found 6 matches

by sturodgers
Mon May 12, 2008 9:29 pm
Forum: JFreeChart
Topic: Closing and disposing a JFrame and ChartPanel
Replies: 1
Views: 2659

Closing and disposing a JFrame and ChartPanel

In my application, the user can create and use multiple charts simultaneously. Currently, each chart is in its own JFrame with DISPOSE_ON_CLOSE set as its default close action. When closing and disposing of a JFrame and ChartPanel, is a call to dispose() sufficient to free up all resources, listener...
by sturodgers
Fri Apr 04, 2008 4:53 pm
Forum: JFreeChart
Topic: Different LayoutManagers, ChartPanels, and JPanels
Replies: 3
Views: 4705

Working code

For anyone's benefit, here are 2 ways to set a chart into a JPanel: First get your chart setup. Something like: MyCategoryDataset dataset = new MyCategoryDataset( initialData ); JFreeChart chart = ChartFactory.createBarChart( "Bar Demo", "Category", "Value", dataset, PlotOrientation.VERTICAL, true, ...
by sturodgers
Fri Apr 04, 2008 4:24 pm
Forum: JFreeChart
Topic: Different LayoutManagers, ChartPanels, and JPanels
Replies: 3
Views: 4705

Your suggestion was dead on. the problem was the layout manager.

The layout manager, javax.swing.GroupLayout, was not being used correctly.
There were two fixes--both worked.
1. use the GroupLayout correctly.
2. switch to a simpler LayoutManager such as FlowLayout.

Thanks for the help!
Stu
by sturodgers
Thu Apr 03, 2008 4:52 pm
Forum: JFreeChart
Topic: JFreeChart Rocks!
Replies: 1
Views: 3397

JFreeChart Rocks!

Dave and all the other contributors to JFreeChart, I just want to pass along some positive comments about JFreeChart. I am sure you get lots of questions and complaints from the various users around the net (especially newbies), but you may not hear much from those that have downloaded and used JFre...
by sturodgers
Thu Apr 03, 2008 2:53 pm
Forum: JFreeChart
Topic: Design pattern for setting common chart options?
Replies: 9
Views: 11302

indio, I agree with the intent of the approach you outlined above. The pattern you might use is a Facade. Basically write several classes that instantiate the settings you want. These classes use the ChartFactory as needed. And do all the customized settings. You can further streamline the approach ...
by sturodgers
Thu Apr 03, 2008 2:33 pm
Forum: JFreeChart
Topic: Different LayoutManagers, ChartPanels, and JPanels
Replies: 3
Views: 4705

Different LayoutManagers, ChartPanels, and JPanels

Is there any problem with adding a ChartPanel to a GUI and using one layout manager when the JPanel into which the ChartPanel is added uses a different layout manager? For example, if I use NetBean's GUI builder (NetBeans 6.0.1) to initially build an application, javax.swing.GroupLayout is used to l...