1

How to add the button to the left of the name of graphics in that area marked by red color?

enter image description here

    chartPanel.setDomainZoomable(false);
    chartPanel.setRangeZoomable(false);
    chartPanel.setPopupMenu(null);
    frame = new JFrame(Title);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.add(chartPanel);
    frame.pack();
    frame.setLocationRelativeTo(null);
    frame.setVisible(true);
Denis
  • 503
  • 8
  • 32

1 Answers1

1

To facilitate use on a headless server, a JFreeChart is not a Swing JComponent. The typical Swing approach is to enclose the chart in a ChartPanel and add the panel to a suitable layout. Add controls to to an adjacent panel, as shown here and here using BorderLayout.SOUTH.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045