CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Threaded View

  1. #1
    Join Date
    Apr 2008
    Posts
    24

    Question need help with validation..

    i wont to includ a validation for these...but i dont no how !!?
    Code:
    if (x==1)
    {
    inp =JOptionpane.showInputDialoge("Enter Number of miles')
    int y= Integer.parseInt(inp);
    double miles=c.KmToMiles(y);
    JOptionpane.showmessageDialog(null,"Miles="+miles);
    
    }
    
    
    if (x==2)
    {
    inp =JOptionpane.showInputDialoge("Enter Number of km ")
    int y= Integer.parseInt(inp);
    double km=c.MilesToKm(y);
    JOptionpane.showmessageDialog(null,"km="+km);
    
    }
    how can i do it ..!!!!!!???
    Last edited by nadykool; April 25th, 2008 at 05:14 PM. Reason: speling

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured