CREATE A LOGIN PAGE

//    Lable and Buttons using Applet
/*
<applet code=login width=280 height=300>
</applet>
*/
import java.applet.*;
import java.awt.*;
public class login extends Applet
{
TextField user_txt,pwd_txt;
Label user,pwd;
Button submit,cancel;
public void init()
{
  user=new Label(" User name ");
  pwd=new Label(" Password ");
user_txt=new TextField(15);
  pwd_txt=new TextField(15);
submit=new Button("  submit  ");
cancel=new Button("  cancel  ");
add(user);
add(user_txt);
add(pwd);
add(pwd_txt);
add(submit);
add(cancel);
}
}

Comments

Popular posts from this blog

Write a java program to create an abstract class named Shape that contains two integers and an abstract method named printArea(). Provide three classes named Rectangle, Triangle and Circle such that each one of the classes extends the class Shape. Each one of the classes contain only the method printArea( ) that prints the area of the given shape.

Create a class named weather report that holds a daily weather report with data member’s day_of_month, hightemp, lowtemp, amount_rain and amount_snow. Use different types of constructors to initialize the objects. Also include a function that prompts the user and sets values for each field so that you can override the default values. Generate monthly report that displays average of each attribute.

Exception_Handling Program