Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 476 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[TUT] Java, GUI password Tutorial [JAVA]

#1
Hello everyone, Iv been learning Java and i thought i would make a quick tutorial for any beginner's, this is 100% my own work not to say someone hasn't done it before as it is very simple but i did code this from scratch after watching about 10 tutorials on different stuff. This tutorial will take a look at Java Gui's and the If, Else statement. Now because it is me i couldn't make a If, Else tutorial without it being based on a password program. So let's begin.



Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.


Code Explained


Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

This just telling java that we are using the JOptionPane, which is just telling it we are using GUI features.



Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

This is just the start of the Class, you can name yours what every you want but i when i was learning i followed a tutorial and he used apple's, so i just kept it. "public static void main(String args[]){" i Dont exactly know how to explain what this does so maybe someone could help me out here but this is basically something that all java programs need to have, You may need to look that up your self.



Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

This is the First part f our GUI, it is a pop up box that has an input area and 2 button's. "String fn" is just the variable that the input is assigned to and where the input is temporarily stored.



Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

This is the first part of our if statement, it just says if fn (User input from first box) equals "root" then. Very simple.



Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

This is the box that will pop if the password entered is correct. it is a standard messagebox that has a label that says "Welcome to the CIA" / a title that says "Login" and the reast just says that it's a message.



Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

End the If statement.



Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

This is the Else statement it just says that, if the pass isn't root then it make's the pop up box say "Incorrect Login Attempt". and title Login.



Hidden Content
You must

[To see links please register here]

or

[To see links please register here]

to view this content.

That is just closing the other statement's, you must do this to be able to rune the program, although my java programming environment did it for me.



Thanks for reading this tutorial, Sorry if you didn't fully understand some bit's. If you would like to to explain any of it again PM me. Thanks you for reading this tutorial hope it helped you.
Reply

#2
Nice share keep it up the good work.
Reply

#3
Thank's man, i have alot more tutorials that i will post if sage make's a programming tab
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through