student database

Ads
 

student database

student records such as fees-school fees, dob,age,if any due.the record stored should be like this record,name,age,dob,fee list or any dues of the student record1 isha 15 20jan record2 spandana 14 4feb record3 nagesh 13 14mar.

if user enters any of the above names it should show its details or else a error message should appear.

View Answers

December 20, 2012 at 3:13 PM

import java.awt.*;
import javax.swing.*;
public class Student extends JFrame
{
static JPanel panel;
JLabel lclgname, lrollno, lname, ldept, laddress, lmobile, lemailid;
JTextField trollno, tname,tdept, taddress, tmobile, temailid;
JButton New, search, save, delete, exit;
GridLayout g1;
public Student()
{
panel =new JPanel();
getContentPane().add(panel);
panel.setLayout(null);

lclgname = new JLabel("DEV UNIVERSITY");
lclgname.setFont(new Font("Arial",Font.BOLD+Font.ITALIC,26));

lrollno= new JLabel("Enter rollno");
lname = new JLabel("Name");
ldept = new JLabel("dept");
laddress = new JLabel("Address");
lmobile = new JLabel("mobile");
lemailid = new JLabel("emailid");



trollno = new JTextField (1);
tname = new JTextField (1);
tdept = new JTextField (1);
taddress = new JTextField (1);
tmobile = new JTextField (1);
temailid = new JTextField (1);


New = new JButton ("New");
search = new JButton ("Search");
save = new JButton ("Save");
delete = new JButton ("Delete");
exit = new JButton ("Exit");


panel.add(lclgname);
panel.add(lrollno);
panel.add(trollno);
panel.add(lname);
panel.add(tname);
panel.add(ldept);
panel.add(tdept);
panel.add(laddress);
panel.add(taddress);
panel.add(lmobile);
panel.add(tmobile);
panel.add(lemailid);
panel.add(temailid);

panel.add(New);
panel.add(search);
panel.add(save);
panel.add(delete);
panel.add(exit);


lclgname.setBounds(10,-50,500,250);

lrollno.setBounds(50,100,80,60);
lname.setBounds(50,150,80,60);
ldept.setBounds(50,200,80,60);
laddress.setBounds(50,250,80,60);
lmobile.setBounds(50,300,80,60);
lemailid.setBounds(50,350,80,60);


trollno.setBounds(500,100,80,40);
tname.setBounds(500,150,80,40);
tdept.setBounds(500,200,80,40);
taddress.setBounds(500,250,80,40);
tmobile.setBounds(500,300,80,40);
temailid.setBounds(500,350,80,40);


New.setBounds(100,550,80,60);
search.setBounds(250,550,80,60);
save.setBounds(400,550,80,60);
delete.setBounds(550,550,80,60);
exit.setBounds(700,550,80,60);
}
public void actionperformed(ActionEvent ae)
{
String s = ae.getActionCommand();
if("submit".equals(s))
{
String s1 = tf1.getText();
String s2 = tf2.getText();
if (s1==s2)
{
lbl.setText("username"+s1+"password"+s2);
}
}
if ("quit".equals(s))
{
System.exit(0);
}
}

public static void main(String args[])
{
ActionTester t = new ActionTester();
Student sd;
sd = new Student();
sd.setSize(900,900);
sd.setVisible (true);
}
}

April 24, 2012 at 3:12 PM

import java.util.*;

class StudentData{
    String record;
    String name;
    int age;
    String dob;

    StudentData(String record, String name, int age,String dob){
        this.record=record;
        this.name=name;
        this.age=age;
        this.dob=dob;
    }
    public String getRecord(){
        return record;
    }
    public String getName(){
        return name;
    }
    public int getAge(){
        return age;
    }
    public String getDob(){
        return dob;
    }
    public static void main(String[] args){
        LinkedList<StudentData> list=new LinkedList<StudentData>();
        list.add(new StudentData("Record1","bindu",20,"20feb"));
        list.add(new StudentData("Record2","kavya",21,"4mar"));
        list.add(new StudentData("Record3","sandhya",22,"5apr"));

        Scanner input=new Scanner(System.in);
        System.out.print("Enter name to display: ");
        String rec=input.next();
        for(StudentData data:list){
            if(data.getRecord().equals(rec)){
            System.out.println(data.getRecord()+"\t"+data.getName()+"\t"+data.getAge()+"\t"+data.getDob());
            }
        }
    }
}

December 20, 2012 at 3:13 PM

    import java.awt.*;
    import javax.swing.*;
    public class Student extends JFrame
    {
    static JPanel panel;
    JLabel lclgname, lrollno, lname, ldept, laddress, lmobile, lemailid;
    JTextField trollno, tname,tdept, taddress, tmobile, temailid;
    JButton New, search, save, delete, exit;
    GridLayout g1;
    public Student()
    {
    panel =new JPanel();
    getContentPane().add(panel);
    panel.setLayout(null);

    lclgname = new JLabel("DEV UNIVERSITY");
    lclgname.setFont(new Font("Arial",Font.BOLD+Font.ITALIC,26));

    lrollno= new JLabel("Enter rollno");
    lname = new JLabel("Name");
    ldept = new JLabel("dept");
    laddress = new JLabel("Address");
    lmobile = new JLabel("mobile");
    lemailid = new JLabel("emailid");



    trollno = new JTextField (1);
    tname = new JTextField (1);
    tdept = new JTextField (1);
    taddress = new JTextField (1);
    tmobile = new JTextField (1);
    temailid = new JTextField (1);


    New = new JButton ("New");
    search = new JButton ("Search");
    save = new JButton ("Save");
    delete = new JButton ("Delete");
    exit = new JButton ("Exit");


    panel.add(lclgname);
    panel.add(lrollno);
    panel.add(trollno);
    panel.add(lname);
    panel.add(tname);
    panel.add(ldept);
    panel.add(tdept);
    panel.add(laddress);
    panel.add(taddress);
    panel.add(lmobile);
    panel.add(tmobile);
    panel.add(lemailid);
    panel.add(temailid);

    panel.add(New);
    panel.add(search);
    panel.add(save);
    panel.add(delete);
    panel.add(exit);


    lclgname.setBounds(10,-50,500,250);

    lrollno.setBounds(50,100,80,60);
    lname.setBounds(50,150,80,60);
    ldept.setBounds(50,200,80,60);
    laddress.setBounds(50,250,80,60);
    lmobile.setBounds(50,300,80,60);
    lemailid.setBounds(50,350,80,60);


    trollno.setBounds(500,100,80,40);
    tname.setBounds(500,150,80,40);
    tdept.setBounds(500,200,80,40);
    taddress.setBounds(500,250,80,40);
    tmobile.setBounds(500,300,80,40);
    temailid.setBounds(500,350,80,40);


    New.setBounds(100,550,80,60);
    search.setBounds(250,550,80,60);
    save.setBounds(400,550,80,60);
    delete.setBounds(550,550,80,60);
    exit.setBounds(700,550,80,60);
    }
    public void actionperformed(ActionEvent ae)
    {
    String s = ae.getActionCommand();
    if("submit".equals(s))
    {
    String s1 = tf1.getText();
    String s2 = tf2.getText();
    if (s1==s2)
    {
    lbl.setText("username"+s1+"password"+s2);
    }
    }
    if ("quit".equals(s))
    {
    System.exit(0);
    }
    }

    public static void main(String args[])
    {
    ActionTester t = new ActionTester();
    Student sd;
    sd = new Student();
    sd.setSize(900,900);
    sd.setVisible (true);
    }
    }

Ads









Related Tutorials/Questions & Answers:
Student database
Student database  Create a class Student with Name, Gender, and Date of Birth and Input Student and print as ?Dear Mr/Mrs Name, your Age is 99 Years?. Mr/Mrs - only one should be displayed based on their age and Gender
student database
student database  student records such as fees-school fees, dob,age,if any due.the record stored should be like this record,name,age,dob,fee list or any dues of the student record1 isha 15 20jan record2 spandana 14 4feb record3
Advertisements
Write a program to get student details and store in a database
Write a program to get student details and store in a database  Write a program to get student details and store in a database
Student
Student  Sir i want display data for dropdownlistbox from database and selected value from dropdownlistbox matched value display from database in table..(using ajax) and each row have edit and delete buttton,i click edit
Database
Database   select * from student i am not asking this.i am asking about that the command line code like create table student(..........) like this way
student details
student details  hi sir/madam i have a doubt in PHP how to insert student details using mysql with php..   Have a look at the following link: PHP Mysql insert
student details
student details  create an application for details of 1st to 5th standard students by using loops and scanner
Student average
Student average  you are an academic scholar.one requirement... that reads student's number of subject taken, the final grade of each subject... should display the average grade of the student and would display the message
Database
Database  is it possible to view the query code after executing it.if yes tell me the procedure.   Yes, if you want to retrieve the data that is stored in database, then use the given query: select * from student
student
student
Student Marks
Student Marks  Hi everyone I have to do this java assignment... programming grades of 8 IT students. Randomly create student numbers for each... in an array. Addresses of Students and store them in array. Previous Grade for student
Student Marks
Student Marks  Create a simple application which can calculate 5 marks entered by user and find the grade. Create a simple application which can calculate 5 marks entered by user and find the grade. You must display the grade
college student admission
college student admission  Front End -JAVA Back End - MS Access Hello Sir, I want College Student Admission Project in Java with Source code, that includes Following Forms 1) Student Admission based on Enterance Exam Marks
student information system
student information system  can you show me example of "student information system" pseudo code and flow chart with "student name, student id, student residential hall, student course, student phone numbers
html code for student information?
html code for student information?  html code for student information
Database
Database  in my database i insert the first name and last name... is the query: insert into student(firstname,lastname,email,dob,phone) values...,we have created a table named 'student': CREATE TABLE `student
Database
Database  in my database i insert the first name and last name... is the query: insert into student(firstname,lastname,email,dob,phone) values('Roseindia...,we have created a table named 'student': CREATE TABLE `student
database
database   when i am writing this code CREATE TABLE student...; Have you run this query directly into the Mysql database? Here it works properly.   Have you run this query directly into the Mysql database? Here
student admission system project
student admission system project  College Student Admission System... Student Admission Project in Java with Source code, that includes Following Forms 1) Student Admission based,its urgent sir
school student attendence report
school student attendence report  Hi i want school student attendence genaration source code please urgent help me
database
database  database
database
database  database application
student weekly attandence genaration
student weekly attandence genaration  Hievery body iam doing student project in that i want student weekly ,yearly attendence generation report this project doing on struts frame front as java back end as oracle 10 g
STUDENT MANAGEMENT SYSTEM
STUDENT MANAGEMENT SYSTEM  can any one help me with the coding if this using awt please!!!!!!! STUDENT MANAGEMENT SYSTEM Table details Student...:insert/update/delete/search student:insert/update/delete/search :result entry
project for Student Admission System
project for Student Admission System  I want Mini Java Project for Student Admission System. actually i want 2 know how 2 start this...please show me my way
database
database  in my database i add some fields.the total fields are first... the fields: CREATE TABLE student ( id bigint(20) NOT NULL auto_increment, firstname... the data, here is the insert query: insert into student (firstname,lastname
Student Management System
Student Management System  Hi , Friend can i get the solution for connecting login page of JFrames to JDBC
database
database  the code for initializing the database connection
database
database  i want to let the user select the name of database and then delete that database.......im doing project in swings netbeans
database
database  use of hyperlink to show the data from database

Ads