Share on Google+Share on Google+

shobana
java programming
1 Answer(s)      5 years and 9 months ago
Posted in : Java Magazine

Hi friends i need simple login form coding using two labels,two textfields and two buttons in netbeans without using database connection. . if you know that logic please tell that...

Ads

View Answers

July 5, 2011 at 4:08 PM


import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

class Login extends JFrame{
 JButton ok,cancel;
 JLabel label1,label2;
 final JTextField  text1,text2;
  Login(){
    setTitle("Login Form");
    setLayout(null);
    label1 = new JLabel();
    label1.setText("Username:");
    text1 = new JTextField(15);

    label2 = new JLabel();
    label2.setText("Password:");
    text2 = new JPasswordField(15);

    ok=new JButton("OK");
    cancel=new JButton("Cancel");
    label1.setBounds(350,100,100,20);
    text1.setBounds(450,100,200,20);
    label2.setBounds(350,130,100,20);
    text2.setBounds(450,130,200,20);
    ok.setBounds(350,160,100,20);
    cancel.setBounds(450,160,100,20);
   add(label1);
   add(text1);
   add(label2);
   add(text2);
   add(ok);
   add(cancel);

   setVisible(true);
   setSize(1024,768);
   }
  public static void main(String arg[]){
  new Login();
  }
}









Related Tutorials/Questions & Answers:
Java Programming
Java Programming  Hi, What is Java Programming? How I can learn Java Programming in one month? Thanks
Java Programming
Java Programming  Write a Java program that prompt user to input a number of students in a class. Then, prompt user to input the student√?¬Ę√Ę‚??¬¨√Ę‚??¬Ęs programming mark. Determine how many student get A+ and A for their grade
Advertisements
Java programming
Java programming  What is the Role of OOP in java
Java programming
Java programming  What is the Role of OOP in java
java programming
java programming  Write a Java program that prompt user to input a number of students in a class. Then, prompt user to input the student‚??s programming mark. Determine how many student get A+ and A for their grade and how many
java programming
java programming  how to write a coding for simple login form in netbeans
programming - Java Beginners
programming for java beginners  How to start programming for java beginners
JAVA PROGRAMMING
JAVA PROGRAMMING  Write an OVERLOADED FUNCTION in java that swaps(interchanges) 2 user given numbers.(one integer and one float value) and displays the result after swapping. Invoke the function in a class
Java Programming
Java Programming  Using Java Frame form, help me develop a GPA calculating device, able to show Grade and points together, and using MySQL database
Java Programming
Java Programming  Using Java Frame form, help me develop a GPA calculating device, able to show Grade and points together, and using MySQL database
java programming
java programming  what is taxonomy tree why we use that concept in java   hierarchical taxonomy is a tree structure of classifications for a given set of objects
java programming
java programming  how to count the no. of constants in a user given string?? plzz help
java programming
java programming  Write a complete Java Program that correctly does the following: prints out first 1000 numbers (not including 1000) with a statement indicating whether it is even or not.. Output: Example Number 0 - Even
java programming
java programming  WAP to calculate the sum of: x + x(square)/2 + x(cube)/3 +.......... x(to the power n)/n
java programming
java programming  Hi friends, if i create one project what are the step i can make...... i need step by step procedure
java programming
java programming  supose i have a text field in java (like in gmail home page u have username field ) so i want to fill that field automatically by taking record from the database so is there any mechanism in java to handle
java programming
java programming  Hi friend if you have any idea about this statement please tel me... String qry1="select * from custentry1 where custid='"+custno
java programming
java programming  Hi friends i need simple login form coding using two labels,two textfields and two buttons in netbeans without using database connection. . if you know that logic please tell
java programming
java programming  Hi, do u have any idea about these lines? Hashtable<Integer,JLabel> labels = new Hashtable<Integer,JLabel>(); labels = new Hashtable<Integer,JLabel>
java programming
java programming  Hi friends, i need a simple login form source code. in that program i have two labels,two text fields and two buttons namely ok and cancel buttons. how to write for that one using netbeans without database
java Programming
java Programming  Based on the following algorithm, write a Java Program Start defining the MyClass class. Declare the class?s myField data field. Initialize the data field. Start defining the SetField() method. Set
Java Programming
Java Programming  Assume that bank maintains two kinds of accounts...://www.roseindia.net/tutorial/java/core/bankAccountApplication.html   thnk...://www.roseindia.net/answers/viewqa/Java-Beginners/27008-q-in-java.html
java programming
java programming  How can be uesd in graphiclly view for user inter (x,y) cordinate and show the output shart point to end point. java code,,????   import org.jfree.chart.*; import org.jfree.chart.plot.PlotOrientation
java programming
java programming  How can be uesd in graphiclly view for user inter (x,y) cordinate and show the output shart point to end point. java code,,????   import org.jfree.chart.*; import org.jfree.chart.plot.PlotOrientation
java programming
java programming  How can be uesd in graphiclly view for user inter (x,y) cordinate and show the output shart point to end point. java code,,????   import org.jfree.chart.*; import org.jfree.chart.plot.PlotOrientation
JAVA PROGRAMMING
JAVA PROGRAMMING  WAP to generate the following Series * * * * * * * * * * * * * * *   class Pyramid{ public static void main(String[] args
Java Programming
Java Programming  A developer wants you to develop a simple take away restaurant order service. The system reads from a file containing information about the restaurants (such as the name, place and menu). The system then allows
java programming
java programming  abstract class demo { void play() { System.out.println("hello"); } void play2() { System.out.println("hi there"); } } class abs extends demo { public static
Java programming
Java programming  Hello! Is anybody able to do this task: I need to find the percentage of words distribution between parts of speech. I have to mark nouns, verbs, adjectives and perpositions like that: to the end of noun
Java programming
Java programming  To make a fraction to a representation base 16 (i.e. hexadecimal) we can multiply it by 16, and the resultant integer part is the first digit of the base-16 representation. Multiplying the fraction left over
java programming
java programming  A name is ALREADY in a string variable in memory. The string is called NAME or NAME$ . The variable holds a person's name with a space between the first and family name. WILLIAM (space) JONES
Tutorials   
Java Spring Hibernate Struts Training Default value of path variable in Windows 7 Windows 7 refresh DNS 550 Access denied - Invalid HELO name (See RFC2821 4.1.1.1) how to change a column data in a every row in a text file in java cursor location what is the Advantages moqui framework vs other frameworks what is the difference between moqui framework vs other frameworks Develop Bulk SMS sender Bundle of servers interface ALU Computer Term How to find the size of a dynamic webpage using java... eg : Youtube........ Question in Create Arraylist ? active window means 1024 bytes equals to can a volatile memory loss data on power cut What is E-Learning? What is E-Learning? What is hacker? different types of storage devices of a computer Examples of optical disk Main job of cpu Main memory is also known as Define computer software. connection between your computer and local isp which part of the cpu does math calculations What is procedure Where i can use UNIX Operating System? What was ENIAC One byte consists of how many bits? What is the use of Bluetooth technology basic function of computer system how to measure data transfer speed GIGO Full Form What is parallel port where are program instructions and data values stored Nible is a computer network is referred as The input device used by computer is The product of data processing is The CPU(Central processing unit)consist of One-thousand of a second is called Alternate facilities of programs, data files, hardware equipment, etc. One-Millionth of a second is referred as Storage medium that loses its contents A LSI chip contains the entire CPU of computer except main memory is called ascending order of a data hierarchy Combining records from two or more orders files into a single ordered file is called Computer questions for Bank PO Exams and upsc competitive exams characteristics of a modem computer

Ads

 
Advertisement null

Ads