private static void displayChart ( JFreeChart chart ) { // Chart panel ChartPanel panel = new ChartPanel ( chart ) ; panel . setFillZoomRectangle ( true ) ; panel . setMouseWheelEnabled ( true ) ; panel . setPreferredSize ( new Dimension ( 1024 , 400 ) ) ; // Application frame ApplicationFrame frame = new ApplicationFrame ( "Ta4j example - Cash flow to chart" ) ; frame . setContentPane ( panel ) ; frame . pack ( ) ; RefineryUtilities . centerFrameOnScreen ( frame ) ; frame . setVisible ( true ) ; }
Displays a chart in a frame .