In the code given below we have extended class ApplicationFrame to create a frame and also pass a string value to the constructor of ApplicationFrame class by using super keyword that will be name of the created frame.
Methods used in this example are described below:
pack(): This method invokes the layout manager.
centerFrameOnScreen(): This method is used for the position of the frame in the middle of the screen.
setVisible(): This method is used for display frame on the screen.
add(): This method is used for added data into DefaultBoxAndWhiskerXYDataset class object.
createBoxAndWhiskerChart(): This method is used to create box and whisker chart for given values. It takes title, domain axisa label, range axis label, dataset and legend as parameters.
Recommend the tutorial
Ask Questions? Discuss: Box And Whisker Chart Example using JFreeChart
Post your Comment