ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Code Snippets  >>  Programming Code  >>  Programming Code AllOther
 
 


 

 
 C Code interview questions  C Code Interview Questions
 C++ Code interview questions  C++ Code Interview Questions
 VC++ Code interview questions  VC++ Code Interview Questions
 Java Code interview questions  Java Code Interview Questions
 Dot Net Code interview questions  Dot Net Code Interview Questions
 Visual Basic Code interview questions  Visual Basic Code Interview Questions
 Programming Code AllOther interview questions  Programming Code AllOther Interview Questions
import java.awt.*;
import java.awt.event.*;

public class Agency extends Frame implements ActionListener
{
	Label l1,l2,l3,l4;
	Button b1;
	TextField t1,t2;
	String s1,s2,s3,s4;


    public static void main(String args[])
   {
	  new Agency().setVisible(true);
   }

    public Agency()
   {
	  super("Gas Agency Package");
	  setSize(1280,800);
	  setBackground(Color.lightGray);
	  setLayout(null);
	 // setLayout(new BorderLayout());


   	  t1=new TextField(20);
   	  t1.setBounds(440,150,200,30);
   	  t1.setBackground(Color.white);
	  t2=new TextField(20);
	  t2.setBounds(440,180,200,30);
      t2.setBackground(Color.white);
	  t2.setEchoChar('*');

 	  l1=new Label("Gas Agency Package");
 	  l1.setBounds(400,30,300,50);

 	  l1.setFont(new Font("TimesRoman",Font.BOLD,25));
 	  l1.setAlignment(Label.CENTER);

 	  l2=new Label("Enter your ID and Passoword");
 	  l2.setFont(new Font("TimesRoman",Font.BOLD,20));
 	  l2.setBounds(270,80,300,50);

 	  l3=new Label("Enter ID");
	   	  l2.setFont(new Font
("TimesRoman",Font.BOLD,20));
 	  l3.setBounds(270,150,120,50);

 	  l4=new Label("Enter Passoword");
	   	  l2.setFont(new Font
("TimesRoman",Font.BOLD,20));
 	  l4.setBounds(270,180,140,50);

       add(l1);
       add(l2);
       add(l3);
       add(t1);
       add(l4);
       add(t2);


 	  b1=new Button("Login");
 	  b1.setBackground(Color.white);
 	  b1.setBounds(400,280,100,70);
 	  b1.addActionListener(this);
 	  add(b1);

   }

    public void actionPerformed(ActionEvent e)
   {

	  if(e.getSource()==b1)
	  {
	     s3="svce";
	     s4="svce";
	     s1=t1.getText();
	     s2=t2.getText();
	     if(s1.equals(s3) && s2.equals(s4))
	     {
			 //System.out.println("password is 
correct");
			 MenuForm m= new MenuForm();
			 m.setVisible(true);
			 //this.dispose();
		 }
		 else
		 {
		 	System.out.println("password  not 
correct");
		}
	     this.dispose();

	  }
   }
}

plzzzzzzz xplain me this java code like why i m including 
this packages n the whole code plzzzzzz


No Answer is Posted For this Question

Be the First to Post Answer

 
 
 
Other Programming Code AllOther Interview Questions
 
  Question Asked @ Answers
 
Write a sql query to find n'th maximum in the database table. Oracle3
i wrote from two tables (employee and department) 1.select * from employee,department; (it is cartesian product) but 2.select * from employee department; (?????????????????) by default it displays the employee table,what is the reason it is not taking department ??? mail @ mak2786@gmail.com Arunkumar  1
DAL in oracle  1
 
For more Programming Code AllOther Interview Questions Click Here 
         
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com