Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners student database
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


tejeshree
student database
3 Answer(s)      2 years and 7 months ago
Posted in : Java Beginners


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.


Advertisement
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);
    }
    }


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
Jdbc Program for building Student Information Database - JDBC
Jdbc Program for building Student Information Database  import... TextArea(10,2); l1=new Label(&quot;Enter student info&quot;); l2=new Label(&quot;Update student info&quot;); l3=new Label(&quot;View
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 info
student info  code of insert,delete,update,view,search of student information using jsp and servelts   Hi Friend, Please visit the following links: http://www.roseindia.net/jsp/user-search.shtml http
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
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
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
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
Student Management System
Student Management System  Hi , Friend can i get the solution for connecting login page of JFrames to JDBC
student attendence report
student attendence report  Hi every body iam doing a school project iam using backend as oracle 10g front end as java . in my project generate student attendence daywise ,monthly ,halfyearly and yearly how i generate plz
Student - Java Beginners
Student  Create a class named Student which has data fields of student metric number, mark for the quizzes (15% from the total mark), lab assignments..., Try the following code: import java.util.*; public class Student{ int
student registration example
student registration example  1.reg.jsp <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http
creating an applet for student management system
creating an applet for student management system  Write an applet/awt... a student management system having the following characteristics: The interface... it to act), and reasonably realistic. It must accept the student id,name,age,address
genarating student weekly progress report
genarating student weekly progress report  Hi every one iam using struts frame work backend as oracle 10g . i want code for how to genarate student weekly and monthly marks . thanks in advance
sorting student record - Java Beginners
sorting student record  Program in java for inserting, recording, deleting, editing and searching student details   can u explain about recording ? u want to store value in database or in file or opertinng run time
Tutorial college Student Admission System
Tutorial college Student Admission System  I want PHP Project for Student Admission System. actually i want 2 know how 2 start this...please show me my way..... please send me synopsis
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
College Student Admission System Project in Java
College Student Admission System Project in Java   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
 

 

 

DMCA.com