Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Adding a Barchart to an Applet using JFreeChart

 
Teja Venkat
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic