So i have this source code...
Now I need to create a second version of this program that uses JOptionPane to get the inputs from the user and show the output! help!package Homework1; import java.util.Scanner; //I had to use scanner in this program because I had to create objects that were in the Scanner class, such as in row 16. // The password is Tradd. /** * @author Tradd Edwin Specter* * @version 1.69, 1 September 2014 * * This program confirms a password typed into a * * console window * */ public class Homework1 { public static void main(String[] args) { //Needs to add a scanner to the program to continue on Scanner keyboard = new Scanner(System.in); //The values are now set up. int tries = 1; String password = "Tradd"; //It tells the name of the program to the user. System.out.println("Password Checker"); //Asks the user to insert their username which can be anything System.out.println("Please enter a Username:"); //takes the username from the keyboard String username = keyboard.next(); //Once a username is put in, the program asks for a password System.out.println("Please enter your password:"); String temp1 = keyboard.next(); // if the password is correct, the user will be approved and the program will be terminated. if(temp1.equals(password)) { System.out.println("You are approved by access control!"); System.exit(0); } //If the password is incorrect then the program will allow the user another chance at getting the password correct. else { System.out.println("Try Again:"); } String temp2 = keyboard.next(); //same as the first "if" in the program if (temp2.equals(password)) { System.out.println("You are approved by access control!"); } // If the user inputs the wrong password again, the program will tell them sorry then terminate the program. else { System.out.println("Sorry"); } System.exit(0); } }