This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Applets and the fly likes Adding a Barchart to an Applet using JFreeChart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Adding a Barchart to an Applet using JFreeChart" Watch "Adding a Barchart to an Applet using JFreeChart" New topic
Author

Adding a Barchart to an Applet using JFreeChart

Teja Venkat
Greenhorn

Joined: Oct 30, 2012
Posts: 27
Hai everyone I had written code for showing a bar chart in an applet the code is given below:


I am getting blank screen on executing this code.. Please help me sort out this problem
Richard Tookey
Rancher

Joined: Aug 27, 2012
Posts: 1129
    
  17

You should not be overriding the paint() method for this. In the init() method you should be creating the JFreeChart, constructing a ChartPanel using the created JFreeChart and adding the ChartPanel as a component to the JApplet component tree - probably the JApplet content pane.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Adding a Barchart to an Applet using JFreeChart