I create a chart using this sample of code :
Java Code:
  Db my=new Db("com.mysql.jdbc.Driver","jdbc:mysql://localhost/mysql","root","");

  SpinnerDateModel model = (SpinnerDateModel)jSpinner1.getModel();
  java.util.Date date=model.getDate();
  Calendar calendar = Calendar.getInstance();
  calendar.setTime(date);
  int day = calendar.get(Calendar.DAY_OF_MONTH);
  int month = calendar.get(Calendar.MONTH)+1;
  int year=calendar.get(Calendar.YEAR);
  String  start_date=Integer.toString(year)+"-"+Integer.toString(month)+"-"+Integer.toString(day);

  model = (SpinnerDateModel)jSpinner2.getModel();
  date=model.getDate();
  calendar.setTime(date);
  day = calendar.get(Calendar.DAY_OF_MONTH);
  month = calendar.get(Calendar.MONTH)+1;
  year=calendar.get(Calendar.YEAR);
  String  finish_date=Integer.toString(year)+"-"+Integer.toString(month)+"-"+Integer.toString(day);
  
  int i=0;
  Statement statement = null;
  Connection connection = null;
  String createDatabaseQyery="select * from quote.all_trades where data>'"+start_date+"' and data<'"+finish_date+"' and time>'10:29:59' and code='iv' order by data,time";

  jTextArea1.append(createDatabaseQyery+'\n');


    JFrame jfrm;
        XYPlot plot;

        jfrm = new JFrame();
        Toolkit tk = Toolkit.getDefaultToolkit();
        int xSize = ((int) tk.getScreenSize().getWidth());
        int ySize = ((int) tk.getScreenSize().getHeight());
        jfrm.setSize(xSize, ySize);
        jfrm.setVisible(true);
        jfrm.setResizable(true);


        XYSeries s1 = new XYSeries("IV");
        double min=1000000;
        double max=0;


  try {
     connection = DriverManager.getConnection("jdbc:mysql://localhost/mysql","root", "");
     statement = connection.createStatement();
     ResultSet rs=statement.executeQuery(createDatabaseQyery);

     while (rs.next()){
     //System.out.println(rs.getString("code")+" "+rs.getString("data")+" "+rs.getString("time")+" "+rs.getString("price")+" "+rs.getString("quantity"));
     String str =rs.getString("price");
     Float f = new Float(str);
     double x = f.doubleValue();

    [B]String t=rs.getString("time");[/B] 
     DateFormat sdf = new SimpleDateFormat("hh:mm:ss");

               try{
               java.util.Date y = sdf.parse(t);
                calendar.setTime(y);
                String time=Integer.toString(calendar.get(Calendar.HOUR_OF_DAY))+":"+Integer.toString(calendar.get(Calendar.MINUTE))+":"+Integer.toString(calendar.get(Calendar.SECOND));
                System.out.println("Date and Time: " +time+t);
               }
                catch (Exception e){
             e.printStackTrace();
             }
     
          [B] s1.add(i,x);[/B] 

            i=i+1;
            if (min>x) min=x;
            if (max<x) max=x;

     }

     }
     catch (Exception e)
     {
     e.printStackTrace();
     }
  finally {
if (statement != null) {
try {
statement.close();
}
catch (SQLException e)
{
e.printStackTrace();
}
}
if (connection!= null) {
try {
connection.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
}


    
        XYSeriesCollection dataset = new XYSeriesCollection();
        dataset.addSeries(s1);



        JFreeChart chart = ChartFactory.createXYLineChart("IV", "", "", dataset,PlotOrientation.VERTICAL, false, false, false);
        chart.setBackgroundPaint(Color.white);
        plot = chart.getXYPlot();
        plot.setBackgroundPaint(Color.lightGray);
        plot.setDomainGridlinePaint(Color.white);
        plot.setRangeGridlinePaint(Color.white);


        final NumberAxis xAxis = (NumberAxis)plot.getDomainAxis();
        final NumberAxis yAxis = new NumberAxis();

        plot.setDomainAxis(xAxis);
        plot.setRangeAxis(yAxis);

        final ChartPanel chartPanel = new ChartPanel(chart);
        jfrm.add(chartPanel);

       chart.getXYPlot().getRangeAxis().setLowerBound(min-2);
       chart.getXYPlot().getRangeAxis().setUpperBound(max+2);
      
    }
But then i insert in dataset S1 string t (contain a time in string format) the net_beans return me an error.How i can show a time value in X-AXiS? Now i plot only i that determine only counter of values from 1 till count of database set.