Bonjour a tous/toute


pour afficher un graphe dans mon interface (sous NetBeans 7.3 ) sur un objet jpanel (jGraf : nom ) j'ai fait ça


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
 
 
  XYPlot plot = chart.getXYPlot();
  plot.setDrawingSupplier(new DefaultDrawingSupplier(new Paint[]{Color.BLACK,Color.BLUE,Color.RED,Color.GREEN,Color.MAGENTA}, new Paint[]{Color.BLACK},new Stroke[]{ plot.getDrawingSupplier().getNextStroke()},new Stroke[]{ plot.getDrawingSupplier().getNextStroke()}, new Shape[]{plot.getDrawingSupplier().getNextShape()}));
        plot.getRangeAxis().setLowerBound(dataset.getRangeLowerBound(true));
        if(plot.getDomainAxis().getLowerBound()>1)plot.getDomainAxis().setLowerBound(dataset.getDomainLowerBound(true));
        else plot.getDomainAxis().setLowerBound(-0.1);
        plot.getDomainAxis().setUpperBound(dataset.getDomainUpperBound(true));
 
ChartPanel chartPanel = new ChartPanel(chart);
       jGraf.add(chartPanel,BorderLayout.CENTER);
       jGraf.validate();


d'aprés les forums ces instruction sont suffisent pour ajouter un chartpanel dans un jpanel ,mais j'ai pas réussi d'afficher dans mon jpanel
merci pour vos repense