bonjour à tous

je veux afficher une courbe et voici mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
 
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.ComponentOrientation;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
 
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
 
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartPanel;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.axis.AxisLocation;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
 
import org.jfree.chart.renderer.category.LineAndShapeRenderer;
import org.jfree.chart.renderer.xy.StandardXYItemRenderer;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.ui.ApplicationFrame;
import org.jfree.ui.RefineryUtilities;
 
 
public class Dessin   {
 
    private CategoryPlot plot;
    private int secondaryDatasetIndex = 0;
    private static double[] a= new double[9];
    private JPanel p;
 
    public Dessin(final double[] a) {
 
    final CategoryDataset dataset1 = createRandomDataset("");
    final JFreeChart chart = ChartFactory.createLineChart( "", "", "",dataset1, PlotOrientation.HORIZONTAL, false, true, false);
    chart.setBackgroundPaint(Color.white);
    this.plot = chart.getCategoryPlot();
    this.plot.setBackgroundPaint(Color.WHITE);
    this.plot.setDomainGridlinePaint(Color.orange);
    this.plot.setRangeGridlinePaint(Color.orange);
    plot.setRangeAxisLocation(1, AxisLocation.BOTTOM_OR_RIGHT);
    plot.setRangeGridlinesVisible(true);
    plot.setDomainGridlinesVisible(true);
 
    final NumberAxis rangeAxis = (NumberAxis) this.plot.getRangeAxis();
    rangeAxis.setAutoRangeIncludesZero(false);
    final JPanel content = new JPanel(new BorderLayout());
    final ChartPanel chartPanel = new ChartPanel(chart);
    content.add(chartPanel);
 
 
 
    p = new JPanel(new FlowLayout());
    content.add(p, BorderLayout.SOUTH);
    chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
    JFrame jFrame = new JFrame();
	jFrame.setSize(805, 605);
 
	jFrame.setTitle("Bec 96 1.0.0");
	jFrame.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
	jFrame.setVisible(true);
	jFrame.setLocationRelativeTo(null);
 
	jFrame.setContentPane(content);
 
    }
 
    private CategoryDataset createRandomDataset(final String name) {
        final DefaultCategoryDataset result = new DefaultCategoryDataset();
        double value = 100.0;
        for (int i = 0; i < 9; i++) {
            final String key = "hhh"+i;
            value =  (a[i]);
            result.addValue(value, name, key);
        }
        return result;
    }
 
 
 
    public static void main(final String[] args) {
 
    	for (int i=0;i<9;i++)
    	{
    		a[i]=i*2;
    	}
        final Dessin demo = new Dessin(a);
 
 
 
    }
 
}
j'ai deux petits soucis:

1) j'ai réussi à faire l'axe des Y en haut mais je veux aussi afficher l'axe des X à droit mais je n'ai pas pu le faire

2) comment je peux afficher les valeur sur ma courbe?????


Merci