Query

Query

HI, i'm getting a nullpointer exception.help me.it's urgent import java.awt.*;

import javax.swing.*;
//import 
public class Employee
{
final int WIDTH = 450;
final int HEIGHT = 400;
JFrame f;
//MenuBar mb;
//Menu m;
//JButton b1,b2,b3,b4,b5,b6,b7;
JPanel p,p1,p2,p3,p4,p5,p6,p7,p8,p9;
JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9;
JTextField t1,t2,t3,t4,t5;
JComboBox c1,c2,c3;
FlowLayout leftLayout;
String s1[]={"1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31"};
String s2[]={"1","2","3","4","5","6","7","8","9","10","11","12"};
String s[]={"Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"};


Employee()
 {
   leftLayout = new FlowLayout(FlowLayout.LEFT);
   //p.setLayout(new BoxLayout(p,BoxLayout.Y_AXIS)); 
   /*p.add(b1);
   p.add(b2);
   p.add(b3);
   p.add(b4);
   p.add(b5);
   p.add(b6);
   p.add(b7);
   f.add(p);*/

   p1= new JPanel();
   p1.setLayout(new FlowLayout(FlowLayout.CENTER));
   l1= new JLabel("Employee Management System");
   p1.add(l1);
   f.add(p1);

f.setLayout(new GridLayout(10,1));
//f.setSize(WIDTH,HEIGHT);
f.setBackground(Color.BLUE);
f.setResizable(true);




   p5=new JPanel();
   l5=new JLabel("Personal Information");
   p5.setLayout(leftLayout);
   p5.add(l5);
   f.add(p5);   
   p2=new JPanel();  
   p2.setLayout(leftLayout);
   l2 = new JLabel(" First Name       ");
   t1 = new JTextField(25);
   f.add(p2);
   p2.add(l2);
   p2.add(t1);


   p3= new JPanel();
   p3.setLayout(leftLayout);
   l3 = new JLabel(" Second Name ");
   t2 = new JTextField(25);
   f.add(p3);
   p3.add(l3);
   p3.add(t2);

   p4= new JPanel();
   p4.setLayout(leftLayout);
   l4 = new JLabel(" Family Name   ");
   t3 = new JTextField(25);
   f.add(p4);
   p4.add(l4);
   p4.add(t3);


   p6=new JPanel();
   l6=new JLabel("Date of Birth");
   p6.setLayout(leftLayout);
   p6.add(l6);
   f.add(p6);


   p7= new JPanel();
   p7.setLayout(leftLayout);
   l7 = new JLabel("   Day of Birth   ");
   c1=new JComboBox(s1);
   p7.add(l7);
   p7.add(c1);   
   f.add(p7);


   p8= new JPanel();
   p8.setLayout(leftLayout);
   l8 = new JLabel(" Month of Birth   ");
   c2=new JComboBox(s2);
   p8.add(l8);
   p8.add(c2);
   f.add(p8);


   p9= new JPanel();
   p9.setLayout(leftLayout);
   l9 = new JLabel("   Year of Birth   ");
   c3=new JComboBox(s);
   p9.add(l9);
   p9.add(c3);
   f.add(p9);


   f.setVisible(true);
   f.setSize(170,170);
   f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 }

public static void main(String []args) 
 {
  Employee a=new Employee();
// a.launchFrame(); 
 }
}
View Answers

August 26, 2012 at 11:33 AM

Plse..It's urgent









Related Tutorials/Questions & Answers:
query in JDBC
query in JDBC  What are the steps required to execute a query in JDBC
Query conversion
Query conversion  can please convert the following mysql query to hibernate query select * from table1 where field1 not in (select field_1 from table3
Advertisements
query optimization
query optimization  hai ! i need a code in java for database query optimization.plz help
query string
query string  Need some examples of query strings.send me as soon as possible. Regards, R.Santhosh
Query Question
Query Question  How would I write a query to display the name, department of the employee that earns the highest salary in the Employees table
HQL Query
HQL Query  Hibernate query language: How to use a left join in Hibernate query language. Can somebody help with an example. I am getting a unexpected token error in HQL Query tool If I use joins
Sql Query
Sql Query  Is this query work in Db2 or not ? Select * from FORUM LIMIT 2
Sql Query
Sql Query  Is this query work in Db2 or not ? Select * from FORUM LIMIT 2
jdbc query
jdbc query  write a query of how to print the values of any column present in database in reverse order
database Query
database Query  i have to find common columns from two tables fron 2 differnt schemas what query to use? i used intersect but i am not getting how it is comapring two tables from different schema because in query we have
database Query
database Query  i have to find common columns from two tables from 2 different schemas what query to use? i used intersect but i am not getting how it is comparing two tables from different schema because in query we have
sql query
sql query  two tables are emp,loc write a query to display all the emp information whose locname not equal to bangalore
session into a query
session into a query  Hi all this am Sreedhar from Hyderabad i am calling one session variable in mysql query but its not working can any one help me please... here is the query.. $query = 'SELECT * FROM post WHERE post_date <
query problem
query problem  how write query in jsp based on mysql table field? i have employee table it contain designation field, how write query in jsp... to write this query in jsp please anybody help me, and send me that code
HQL query
HQL query  how to select only password based on username using HQL query from login table where uname and paswrd are two column names
SQL Query
SQL Query  Selecting the third highest salary of Employee without using any subquery?   Here is a query: SELECT salary FROM employee ORDER BY salary DESC LIMIT 2,1
Hibernate SQL Query/Native Query
This tutorial describes Hibernate SQL Query, which is also known as Native Query
query string
query string  on my servlet page i take the values of the field in a variable and that variable is a primary key so on the basis of that i am sorting... servlet page to different servlet jsp page and that i want to do with query string so
need query
need query  hi sir , i am beginner to sql.i need a query so that it can be helpful to my project. i have four tables each containing different fruits with different amounts. i need a query in such a way that when i say some
sql query
query plz help to me
sql query
query plz help to me
sql query
query plz help to me
Sql Query
Sql Query  Hi M Navjeet Ghai I want to know How to Show A name(Like Navjeet Ghai And Manpreet Singh Sodhi) of employees from a employee table as N.Ghai & M.S.Sodhi by using sql query
select query
select query  how to write select query with where clause having multiple variables. example: i want to select the data from DB in which i want to check againest two variable in where cluase. String sql = "select * from
SQL QUERY
Gopal oracle C Now i need to write a query "which
Query in jsp
Query in jsp  I have one textbox in jsp. when i will write any letter in that textbox i want all values which are starting from that letter in option from database. same as we are getting in google search textbox. Thank
dynamic query
dynamic query  DECLARE QUERY VARCHAR2(32767); FIN_QUERY VARCHAR2...; PORTFOLIO_LEVEL ARRAY; IDX NUMBER :=1; BEGIN QUERY..._LEVEL; IDX := IDX + 1; END IF; END LOOP; QUERY := QUERY
Query
query
query
Query
query
query
query
query
query
Query
Query
query
Query
query
query
query
query
query
query - SQL
tell me how to write the query in database but not jsp code. thank u
select query in mysql
select query in mysql  Select query in mysql. Can anyone
upgrading sql query join
upgrading sql query join  upgrading sql query join
Query to Test MySQL Performance
Query to Test MySQL Performance  Query to Test MySQL Performance
Hibernate Query - Hibernate
Hibernate Query  Hibernate Query

Ads