Advance Java Login Form,
java login form using jframe
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.Color;
public class Login extends JFrame
{
public Login()
{
setTitle("Login Form");
getContentPane().setBackground(Color.pink);
setSize(300,200);
setLayout(null);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLocation(400, 200);
JLabel l0=new JLabel("Login Form");
l0.setBounds(150,10,100,20);
add(l0);
JLabel l1=new JLabel("Enter User Name");
l1.setBounds(30,50,100,20);
add(l1);
JTextField textFieldUserName = new JTextField(50);
textFieldUserName.setBounds(140,50,80,20);
add(textFieldUserName);
JLabel l2=new JLabel("Enter Password");
l2.setBounds(30,90,100,20);
add(l2);
JTextField textFieldUserPass = new JTextField(50);
textFieldUserPass.setBounds(140,90,80,20);
add(textFieldUserPass);
JButton b1 = new JButton("sumit");
b1.setBounds(30,130,70,20);
add(b1);
JButton b2 = new JButton("Clear");
b2.setBounds(140,130,70,20);
add(b2);
setVisible(true);
}
public static void main(String s[])
{
Login obj=new Login();
}
}