Just say hello to my favourite IDE : NETBEANS!! At previous time, I still use PHP Designer as Main IDE, but since I worked under few of the other language such as RoR and JAVA, NETBEANS is the best IDE for me.
Well, this is my simple and short JAVA tutorial about how to create login form using SWING.
Ok, let’s open your Netbeans IDE, and chose New Java Application Project
Right click on your package of project to create new jFrame from
And then create 3 jLabel from swing control at the right panel, consist of Login title, User ID and Password
Create 1 jTextField for User ID and 1 jPasswordField for Password
The last is create a jButton into form
Right click on jButton to perform an action when button clicked
and add this code:
JOptionPane.showMessageDialog(this, "Selamat Datang" + jTextField1.getText() + "Password Anda adalah: " + jPasswordField1.getText(), "", JOptionPane.INFORMATION_MESSAGE);
simple isn’t it??
Now press F6 to run and build your project
Many thanks!
Hello! Thank you very much for that enlightening article