2 Replies - 455 Views - Last Post: 18 May 2009 - 03:20 AM Rate Topic: -----

#1 Free1010bird  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 16
  • Joined: 15-May 09

validating password application

Post icon  Posted 17 May 2009 - 06:29 AM

//import dialog box
import javax.swing.JOptionPane;
//create class
public class ValidatePassWord
{
// rules for password
//must be 6 character long
//must be 10 character or less
//must contain 1 letter and one digit
//user will be required to enter password 2x, second attempt must match first

public static void main(String[] args)

{
String guideLines;
guideLines = JOptionPane.showMessageDialog("Create password \n" +
"Password must be min 6 characters in length\n" +
" no more than\n" +
"10 characters and must contain 1 letter and 1 digit.");


{

String result1 = JOptionPane.showInputDialog(null, "Enter your = password.");

{
while (test(result1))
{
if
{
(result1 >= 6 char len && <= 10 return true);
else if
(return false);
(
if
(result 1 = no alphanumeric in string return false);
else if
(return true);


}

//I want to display a dialog box that tells the guidelines for creating a password and
// and then display a dialog box asking user to enter their password.
//how would I accomplish the above two steps. Do I enter the next method after the System.exit(0)
//another question? for guidelines = and result = do I need to insert parenthesis around the whole
//statement that follows the equal sign includng JOption?

Is This A Good Question/Topic? 0
  • +

Replies To: validating password application

#2 born2c0de  Icon User is offline

  • printf("I'm a %XR",195936478);
  • member icon

Reputation: 180
  • View blog
  • Posts: 4,667
  • Joined: 26-November 04

Re: validating password application

Posted 17 May 2009 - 11:05 PM

Moved to Java Forum.
Was This Post Helpful? 0
  • +
  • -

#3 g00se  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 2780
  • View blog
  • Posts: 11,765
  • Joined: 20-September 08

Re: validating password application

Posted 18 May 2009 - 03:20 AM

This is a duplicate
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1