Password Generator menu

User Tag List

Results 1 to 7 of 7
  1. #1
    Aimladen's Avatar Active Member
    Reputation
    16
    Join Date
    Sep 2008
    Posts
    84
    Thanks G/R
    1/2
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Password Generator

    Code:
    import javax.swing.JOptionPane;
    
    public class Password {
    
    	static char[] chars = {
    		'a', 'b', 'c', 'd',
    		'e', 'f', 'g', 'h',
    		'i', 'j', 'k', 'l',
    		'm', 'n', 'o', 'p',
    		'q', 'r', 's', 't',
    		'u', 'v', 'w', 'x',
    		'y', 'z', '1', '2',
    		'3', '4', '5', '6',
    		'7', '8', '9', '0'
    	};
    
    	public static void main(String[] args) {
    		int l = getLength();
    		System.out.println(getPassword(l));
    	}
    
    	private static String getPassword(int l) {
    		int x1 = chars.length;
    
    		String t = "";
    
    		for(int x=0; x<l; x++)
    			t += (0 + (int) (Math.random() * 2))
    			> 0 ? Character.toUpperCase(
    			chars[(int) (Math.random() * x1)]):
    			chars[(int) (Math.random() * x1)];
    
    		return t;
    	}
    
    	private static void showDialog(String s) {
    		JOptionPane.showMessageDialog(null, s);
    	}
    
    	private static int getLength() {
    
    		try{
    			return Integer.parseInt(
    			JOptionPane.showInputDialog(null,
    			"Enter the length of the password!"));
    		}catch(NumberFormatException ex) {
    			showDialog("Enter a number!");
    		}
    
    		return getLength();
    	}
    
    }
    A password generator that can be used to just make yourself a quick randomized password, save it on your computer somewhere, etc. Good if you don't want to create one I suppose.

    Password Generator
  2. #2
    psyco92yay's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do i just copy the code and put it in JCreator and run it?

  3. #3
    Kevve's Avatar Banned
    Reputation
    20
    Join Date
    May 2007
    Posts
    151
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, this is probably copied, since "import javax.swing.JOptionPane;" means there is more than one file that this one needs to work, and if you knew about java you would say you HAVE to name the CLASS file to "password" since the public class is named "password". You don't know a shit about JAVA. Don't post here mate.

  4. #4
    Licha's Avatar Member
    Reputation
    7
    Join Date
    May 2007
    Posts
    62
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Kevve View Post
    No, this is probably copied, since "import javax.swing.JOptionPane;" means there is more than one file that this one needs to work, and if you knew about java you would say you HAVE to name the CLASS file to "password" since the public class is named "password". You don't know a shit about JAVA. Don't post here mate.

    import javax.swing.JOptionPane;

    This means that the program is importing an method called "JOptionPane" it has nothing too do with other files, If YOU knew about java you would know that

  5. #5
    insignia96's Avatar Banned
    Reputation
    33
    Join Date
    Oct 2008
    Posts
    304
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Glad someone shut that idiot up XD

  6. #6
    xxdennisxx's Avatar Member
    Reputation
    1
    Join Date
    Aug 2008
    Posts
    1
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Licha View Post
    import javax.swing.JOptionPane;

    This means that the program is importing an method called "JOptionPane" it has nothing too do with other files, If YOU knew about java you would know that
    Actually you are importing a Class not a method.

    good work. (If not leached.)

  7. #7
    Syplex23's Avatar Contributor
    Reputation
    92
    Join Date
    Dec 2007
    Posts
    649
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nice im doing java next term in ipt (Information Processing Technology)

Similar Threads

  1. Password and random string generator
    By someone32 in forum Community Chat
    Replies: 1
    Last Post: 05-03-2009, 12:41 PM
  2. Random Password Generator!
    By -=Demon=- in forum World of Warcraft Bots and Programs
    Replies: 45
    Last Post: 06-07-2008, 12:30 AM
  3. EmiloZ's Password Generator
    By EmiloZ in forum WoW EMU Programs
    Replies: 23
    Last Post: 12-08-2007, 11:41 AM
  4. Anyone know of a CD key generator i can get?
    By Ðeception in forum World of Warcraft General
    Replies: 0
    Last Post: 09-14-2006, 10:02 PM
  5. [News] WoW Trojan Steals Passwords To Cash Out
    By Cypher in forum World of Warcraft General
    Replies: 9
    Last Post: 05-04-2006, 02:16 PM
All times are GMT -5. The time now is 03:10 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search