Академический Документы
Профессиональный Документы
Культура Документы
import java.awt.Color;
import java.io.*;
import java.util.*;
import java.awt.Container;
import java.awt.Font;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.*;
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
import java.security.SecureRandom;
import java.math.BigInteger;
ArrayList<StudentRegistration> list4;
public AddInfo(StudentRegistration r)
try
list4=(ArrayList<StudentRegistration>)oin.readObject();
}catch(Exception e)
list4=new ArrayList<StudentRegistration>();
list4.add(r);
try
oout.writeObject(list4);
catch(Exception e){}
//AddNewFee
static String E;
ArrayList<Registration1> list;
super(title);
list=new ArrayList<Registration1>();
Container c=getContentPane();
c.setLayout(new GridLayout(10,2));
t1=new JTextField(20);
t2=new JTextField(20);
t3=new JTextField(20);
t4=new JTextField(20);
for(int i=0;i<11;i++)
cvalue[i]=String.valueOf(i);
c1=new JComboBox(cvalue);
String ctvalue[]={"Select","A","B","C","D"};
c2=new JComboBox(ctvalue);
for(int i=0;i<=30;i++)
dvalue[i]=String.valueOf(i+1);
day=new JComboBox(dvalue);
for(int i=0;i<=11;i++)
mvalue[i]=String.valueOf(i+1);
month=new JComboBox(mvalue);
int cnt=0;
for(int i=2000;i<=2011;i++)
yvalue[cnt]=String.valueOf(i);
cnt++;
year=new JComboBox(yvalue);
cpanel.add(day);
cpanel.add(month);
cpanel.add(year);
for(int i=0;i<61;i++)
rvalue[i]=String.valueOf(i);
c3=new JComboBox(rvalue);
int cnt1=0;
for(int i=100;i<150;i++)
regvalue[cnt1]=String.valueOf(i);
cnt1++;
c7=new JComboBox(regvalue);
String
wvalue[]={"Select","Jan","Feb","March","April","May","June","July","August","Sept","
October","Nov","Dec"};
c4=new JComboBox(wvalue);
//c4.addItemListner(this);
//CREATING BUTTONS
b1=new JButton("Back",icon0);
b1.addActionListener(this);
b1.setFont(f10);
b2=new JButton("Add",icon1);
b2.addActionListener(this);
b2.setFont(f10);
l1.setFont(f1);
l1.setForeground(Color.BLUE);
l2.setFont(f2);
l2.setForeground(Color.BLUE);
l3.setFont(f3);
l3.setForeground(Color.BLUE);
l4.setFont(f4);
l4.setForeground(Color.BLUE);
l5.setFont(f5);
l5.setForeground(Color.BLUE);
l6.setFont(f6);
l6.setForeground(Color.BLUE);
l7.setFont(f7);
l7.setForeground(Color.BLUE);
l8.setFont(f8);
l8.setForeground(Color.BLUE);
l9.setFont(f9);
l9.setForeground(Color.BLUE);
c.add(l1);c.add(t1);
c.add(l2);c.add(c1);
c.add(l3);c.add(c2);
c.add(l4);c.add(c3);
c.add(l5);c.add(c7);
c.add(l6);c.add(cpanel);
c.add(l7);c.add(t3);
c.add(l8);c.add(c4);
c.add(l9);c.add(t4);
c.add(b1);c.add(b2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
String ct=(String)c4.getSelectedItem();
}*/
if(ae.getSource()==b1)
dispose();
else if(ae.getSource()==b2)
if(con==JOptionPane.YES_OPTION)
String A1=t1.getText();
String B1=(String)c1.getSelectedItem();
String C1=(String)c2.getSelectedItem();
String D1=(String)c3.getSelectedItem();
E=(String)c7.getSelectedItem();
String d=(String)day.getSelectedItem();
String m=(String)month.getSelectedItem();
String y=(String)year.getSelectedItem();
String F=t3.getText();
String G=(String)c4.getSelectedItem();
String H=t4.getText();
else
String reg="^[a-zA-Z]";
if(result !=null)
try
try
list=(ArrayList<Registration1>)oin.readObject();
}catch(Exception e)
list=new ArrayList<Registration1>();
Registration1 r=new
Registration1(A1,B1,C1,D1,E,dob,F,G,H);
list.add(r);
FileOutputStream fout=new
FileOutputStream("Store.dat");
oout.writeObject(list);
catch(Exception e)
System.out.println("Error : "+e);
else
t1.setText("");
JOptionPane.showMessageDialog(this,"Invalid Name..");
//AddNewLibAcc
static String e;
ArrayList<NewLib> list;
t1=new JTextField(20);
t2=new JTextField(20);
for(int i=0;i<11;i++)
cvalue[i]=String.valueOf(i);
c1=new JComboBox(cvalue);
int cnt2=0;
for(int i=100;i<150;i++)
reg1value[cnt2]=String.valueOf(i);
cnt2++;
c7=new JComboBox(reg1value);
String ctvalue[]={"Select","A","B","C","D"};
c2=new JComboBox(ctvalue);
for(int i=0;i<=30;i++)
dvalue[i]=String.valueOf(i+1);
day=new JComboBox(dvalue);
for(int i=0;i<=11;i++)
mvalue[i]=String.valueOf(i+1);
month=new JComboBox(mvalue);
int cnt=0;
for(int i=2000;i<=2011;i++)
yvalue[cnt]=String.valueOf(i);
cnt++;
year=new JComboBox(yvalue);
cpanel.add(day);
cpanel.add(month);
cpanel.add(year);
for(int i=0;i<=59;i++)
rvalue[i]=String.valueOf(i+1);
c3=new JComboBox(rvalue);
for(int i=0;i<5;i++)
wvalue[i]=String.valueOf(i);
c4=new JComboBox(wvalue);
for(int i=0;i<5;i++)
svalue[i]=String.valueOf(i);
c6=new JComboBox(svalue);
//CREATING BUTTONS
b1=new JButton("Back",icon0);
b1.addActionListener(this);
b2=new JButton("Add",icon1);
b2.addActionListener(this);
l1.setFont(f);
l1.setForeground(Color.BLUE);
l2.setFont(f);
l2.setForeground(Color.BLUE);
l3.setFont(f);
l3.setForeground(Color.BLUE);
l4.setFont(f);
l4.setForeground(Color.BLUE);
l5.setFont(f);
l5.setForeground(Color.BLUE);
l6.setFont(f);
l6.setForeground(Color.BLUE);
l7.setFont(f);
l7.setForeground(Color.BLUE);
l8.setFont(f);
l8.setForeground(Color.BLUE);
c.add(l1);c.add(t1);
c.add(l2);c.add(c1);
c.add(l3);c.add(c2);
c.add(l4);c.add(c3);
c.add(l5);c.add(c7);
c.add(l6);c.add(c4);
c.add(l7);c.add(cpanel);
c.add(l8);c.add(c6);
c.add(b1);c.add(b2);
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Mandatory line Compulsary if window is close prog terminate
if(ae.getSource()==b1)
dispose();
else if(ae.getSource()==b2)
if(con==JOptionPane.YES_OPTION)
String a=t1.getText();
String b=(String)c1.getSelectedItem();
String c=(String)c2.getSelectedItem();
String d1=(String)c3.getSelectedItem();
e=(String)c7.getSelectedItem();
String f=(String)c4.getSelectedItem();
String d=(String)day.getSelectedItem();
String m=(String)month.getSelectedItem();
String y=(String)year.getSelectedItem();
String g=(String)c6.getSelectedItem();
else{
String reg="^[a-zA-Z]";
if(result !=null)
try
try
FileInputStream fin=new
FileInputStream("lib.dat");
ObjectInputStream oin=new
ObjectInputStream(fin);
list=(ArrayList<NewLib>)oin.readObject();
}catch(Exception ex)
list=new ArrayList<NewLib>();
list.add(r);
oout.writeObject(list);
catch(Exception ex)
System.out.println("Error : "+ex);
else
t1.setText("");
JOptionPane.showMessageDialog(this,"Invalid Name..");
//AdminAcc
super(title);
Container c=getContentPane();
b1=new JButton("Principal",icon0);
b1.setFont(f);
b1.addActionListener(this);
b2=new JButton("Teachers",icon1);
b2.setFont(f);
b2.addActionListener(this);
b3=new JButton("Staff",icon2);
b3.setFont(f);
b3.addActionListener(this);
bsubmit=new JButton("Home",icon3);
bsubmit.addActionListener(this);
bsubmit.setFont(f1);
String svalue[]={"select","Accounts","Library"};
jstaff=new JComboBox(svalue);
jstaff.addItemListener(this);
c.add(new JLabel(""));c.add(b3);c.add(jstaff);
c.add(bsubmit);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
String js=(String)jstaff.getSelectedItem();
JOptionPane.showMessageDialog(this,"Staff : "+js);
dispose();
if(ae.getSource()==b1)
dispose();
else if(ae.getSource()==b2)
dispose();
else if(ae.getSource()==b3)
dispose();
else if(ae.getSource()==bsubmit)
new FrontPage("welcome");
dispose();
//ALogin
super(title);
Container c=getContentPane();
l1=new JLabel("WELCOME!");
l1.setFont(f);
l1.setForeground(Color.BLACK);
l1.setBackground(Color.GREEN);
l2.setFont(f1);
l2.setForeground(Color.BLUE);
tid1.setFont(f1);
l3.setFont(f1);
l3.setForeground(Color.BLUE);
tpass=new JPasswordField(10);
bsubmit=new JButton("Login",icon0);
bsubmit.setFont(f2);
bsubmit.addActionListener(this);
breset=new JButton("Back",icon1);
breset.setFont(f2);
breset.addActionListener(this);
c.add(l1);c.add(new JLabel(""));
c.add(l2);c.add(tid1);
c.add(l3);
c.add(tpass);
c.add(bsubmit);
c.add(breset);
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
String id1=tid1.getText();
String pass1=tpass.getText();
if(ae.getSource()==breset)
dispose();
else if(ae.getSource()==bsubmit)
if((id1.equals(id[0]))&&(pass1.equals(pass[0])))
dispose();
else if((id1.equals(id[1]))&&(pass1.equals(pass[1])))
dispose();
else if((id1.equals(id[2]))&&(pass1.equals(pass[2]))){
dispose();
else if((id1.equals(id[3]))&&(pass1.equals(pass[3]))){
dispose();
else if((id1.equals(""))||(pass1.equals(""))){
else
tid1.setText("");
tpass.setText("");
//CheckID
ArrayList<StudentRegistration> list;
try
list=(ArrayList<StudentRegistration>)oin.readObject();
if((rg.getUserid()).equals(list.get(p).getUserid().trim()))
f = p;
break;
return(f);
}catch(Exception e)
return(-1);
//DelStuInAcc
t1=new JTextField(20);
//CREATING BUTTONS
b1=new JButton("Back",icon0);
b1.addActionListener(this);
b1.setFont(f2);
b2=new JButton("Delete",icon1);
b2.addActionListener(this);
b2.setFont(f2);
l1.setFont(f1);
l1.setForeground(Color.BLUE);
c.add(l1);c.add(t1);
c.add(b1);c.add(b2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b2)
String rg1=t1.getText();
if(rg1.equals(""))
else{
int f=0;
try
list =(ArrayList<Registration1>)oin.readObject();
//int f=0;
for(Registration1 re : list)
if(rg1.equals(re.getRegistration_no()))
list.remove(list.indexOf(re));
f=1;
break;
if(f!=1){
else
if(con==JOptionPane.YES_OPTION)
out.writeObject(list);
else if(con==JOptionPane.NO_OPTION)
catch(Exception e)
e.printStackTrace();
else if(ae.getSource()==b1)
dispose();
//DelStu
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLUE);
tid=new JTextField(15);
bsubmit=new JButton("Back",icon0);
bsubmit.setFont(f2);
bsubmit.addActionListener(this);
breset=new JButton("Ok",icon1);
breset.setFont(f2);
breset.addActionListener(this);
c.add(l1);c.add(tid);
c.add(bsubmit);c.add(breset);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==breset)
String id=tid.getText();
if(id.equals(""))
else
int f=0;
ArrayList<StudentRegistration> list=new
ArrayList<StudentRegistration>();
try
list =(ArrayList<StudentRegistration>)oin.readObject();
//int f=0;
for(StudentRegistration re : list)
if(id.equals(re.getUserid()))
list.remove(list.indexOf(re));
f=1;
break;
if(f!=1)
else
if(con==JOptionPane.YES_OPTION)
out.writeObject(list);
else if(con==JOptionPane.NO_OPTION)
}catch(Exception e)
e.printStackTrace();
else if(ae.getSource()==bsubmit)
dispose();
//DelStuInLib
t1=new JTextField(20);
//CREATING BUTTONS
b1=new JButton("Back",icon0);
b1.addActionListener(this);
b1.setFont(f2);
b2=new JButton("Delete",icon1);
b2.addActionListener(this);
b2.setFont(f2);
l1.setFont(f1);
l1.setForeground(Color.BLUE);
c.add(l1);c.add(t1);
c.add(b1);c.add(b2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b2)
String rg1=t1.getText();
if(rg1.equals(""))
else
int f=0;
try
list =(ArrayList<NewLib>)oin.readObject();
//int f=0;
for(NewLib re : list)
if(rg1.equals(re.getRegistration()))
list.remove(list.indexOf(re));
f=1;
break;
if(f!=1)
else
if(con==JOptionPane.YES_OPTION)
out.writeObject(list);
else if(con==JOptionPane.NO_OPTION)
catch(Exception e)
e.printStackTrace();
else if(ae.getSource()==b1)
dispose();
//Display
public Display()
super("Display All");
String heading[]={"Name","Guardian","Guardian
Name","Income","Class","Section","Roll","Gender","Date Of
Birth","City","Bgrp","Address","Userid","Password","Cpassword","Squestion","Sanswer
"};
ArrayList<StudentRegistration> list=new
ArrayList<StudentRegistration>();
try
list=(ArrayList<StudentRegistration>)oin.readObject();
int r=0,c=0;
for(StudentRegistration re : list)
data[r][0]=re.getName();
data[r][1]=re.getGuardian();
data[r][2]=re.getGuardianname();
data[r][3]=re.getIncome();
data[r][4]=re.getClas();
data[r][5]=re.getSection();
data[r][6]=re.getRoll();
data[r][7]=re.getGender();
data[r][8]=re.getDob();
data[r][9]=re.getCity();
data[r][10]=re.getBgrp();
data[r][11]=re.getAddress();
data[r][12]=re.getUserid();
data[r][13]=re.getPassword();
data[r][14]=re.getCpassword();
data[r][15]=re.getSquestion();
data[r][16]=re.getSanswer();
r++;
c=0;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//DisplayAllLib
public DisplayAllLib()
super("Display All");
try
list=(ArrayList<NewLib>)oin.readObject();
int r=0,c=0;
for(NewLib re : list)
data[r][0]=re.getName();
data[r][1]=re.getClass2();
data[r][2]=re.getSection();
data[r][3]=re.getRoll_no();
data[r][4]=re.getRegistration();
data[r][5]=re.getBookWithdraw();
data[r][6]=re.getDateOfWithdraw();
data[r][7]=re.getRemaining();
r++;
c=0;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//DisplayAllRegi1
super("Display All");
String
heading[]={"Name","Class","Section","Roll.no","Registration.no","Date Of
Submission","Voucher no.","Payment Month","Due"};
try
list=(ArrayList<Registration1>)oin.readObject();
int r=0,c=0;
for(Registration1 re : list)
data[r][0]=re.getName();
data[r][1]=re.getClass1();
data[r][2]=re.getSection();
data[r][3]=re.getRollno();
data[r][4]=re.getRegistration_no();
data[r][5]=re.getDate_of_submission();
data[r][6]=re.getVoucher_no();
data[r][7]=re.getPayment_month();
data[r][8]=re.getDue();
r++;
c=0;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//DisplayAllTime
public DisplayAllTime()
super("Display All");
try
list=(ArrayList<TimeTableInput>)oin.readObject();
int r=0,c=0;
for(TimeTableInput re : list)
data[r][0]=re.getClas();
data[r][1]=re.getAt();
data[r][2]=re.getBt();
data[r][3]=re.getCt();
r++;
c=0;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200)
setVisible(true)
catch(Exception e)
System.out.println(e);
//DisplayResult
super("Display all");
s1=ResultReg.rg;
String heading[]={"Name","class","section","rollno","registration_no","marks"};
try
list1=(ArrayList<EditResultInput>)oin.readObject();
int r=0,c=0;
for(EditResultInput re : list1)
if(s1.equals(re.getRegistration()))
data[r][0]=re.getName();
data[r][1]=re.getClas();
data[r][2]=re.getSection();
data[r][3]=re.getRollno();
data[r][4]=re.getRegistration();
data[r][5]=re.getMarks();
r++;
c=0;
flag=1;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//DisplaySingleLibAcc
super("Display All");
s1=SearchStudentInAcc.rg;
String heading[]={"Name","Class","Section","Roll.no","Registration.no","Date
Of Submission","Voucher no.","Payment Month","Due"};
try
list=(ArrayList<Registration1>)oin.readObject();
int r=0,c=0;
for(Registration1 re : list)
if(s1.equals(re.getRegistration_no()))
data[r][0]=re.getName();
data[r][1]=re.getClass1();
data[r][2]=re.getSection();
data[r][3]=re.getRollno();
data[r][4]=re.getRegistration_no();
data[r][5]=re.getDate_of_submission();
data[r][6]=re.getVoucher_no();
data[r][7]=re.getPayment_month();
data[r][8]=re.getDue();
r++;
c=0;
flag=1;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//DisplaySingleAtt
String s1,s2,s3,s4;
public DisplaySingleAtt()
super("Display All");
s1=FAttendenceFrame.a;
s2=FAttendenceFrame.b;
s3=FAttendenceFrame.c;
s4=FAttendenceFrame.d;
String heading[]={"Name","Class","Section","Roll.no","Attendence
month","Days present","Absent"};
try
list=(ArrayList<AttendenceReg>)oin.readObject();
int r=0,c=0;
for(AttendenceReg re : list)
if(s1.equals(re.getCla()))
if(s2.equals(re.getSection()))
if(s3.equals(re.getRoll_no()))
if(s4.equals(re.getAttendence_Month()))
data[r][0]=re.getName();
data[r][1]=re.getCla();
data[r][2]=re.getSection();
data[r][3]=re.getRoll_no();
data[r][4]=re.getAttendence_Month();
data[r][5]=re.getPresent_month();
data[r][6]=re.getAbsent_month();
r++;
c=0;
flag=1;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
// DisplaySingleLib
super("Display All");
s1=SearchStudentInLib.rg
try
list=(ArrayList<NewLib>)oin.readObject();
int r=0,c=0;
for(NewLib re : list)
if(s1.equals(re.getRegistration()))
data[r][0]=re.getName();
data[r][1]=re.getClass2();
data[r][2]=re.getSection();
data[r][3]=re.getRoll_no();
data[r][4]=re.getRegistration();
data[r][5]=re.getBookWithdraw();
data[r][6]=re.getDateOfWithdraw();
data[r][7]=re.getRemaining();
r++;
c=0;
flag=1;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//DisplaySingleInMen
super("Display All");
s1=SearchStudentInMenu.rg;
try
list=(ArrayList<NewLib>)oin.readObject();
int r=0,c=0;
for(NewLib re : list)
if(s1.equals(re.getRegistration()))
data[r][0]=re.getName();
data[r][1]=re.getClass2();
data[r][2]=re.getSection();
data[r][3]=re.getRoll_no();
data[r][4]=re.getRegistration();
data[r][5]=re.getBookWithdraw();
data[r][6]=re.getDateOfWithdraw();
data[r][7]=re.getRemaining();
r++;
c=0;
flag=1;
Container con=getContentPane();
con.setLayout(new BorderLayout());
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//DisplayTopper
int flag;
static int a;
public DisplayTopper()
super();
String s1=Topper.cl;
String s2=Topper.sec;
String s3,temp;
String heading[]={"Name","class","section","rollno","registration_no","marks"};
try
list1=(ArrayList<EditResultInput>)oin.readObject();
int r=0,c=0;
for(EditResultInput re : list1)
if(s1.equals(re.getClas())){
if(s2.equalsIgnoreCase(re.getSection()))
data[r]=re.getMarks();
r++;
else
a=-1;
for(int i=0;i<r-1;i++){
for(int j=i+1;j<r;j++){
if((data[i]).compareTo(data[j])>0){
temp=data[i];
data[i]=data[j];
data[j]=temp;
//flag=data[r];
s3=data[r-1];
for(EditResultInput re : list1)
if(s3.equals(re.getMarks())){
data1[c][0]=re.getName();
data1[c][1]=re.getClas();
data1[c][2]=re.getSection();
data1[c][3]=re.getRollno();
data1[c][4]=re.getRegistration();
data1[c][5]=re.getMarks();
c++;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//EditResult
ArrayList<EditResultInput> list1;
super(title);
Container c=getContentPane();
c.setLayout(new GridLayout(7,3));
l1.setFont(f1);
l1.setForeground(Color.BLUE);
tid=new JTextField(20);
for(int i=0;i<10;i++)
value1[i]=String.valueOf(i);
cmo=new JComboBox(value1);
String value2[]={"select","A","B","C","D"};
cmu=new JComboBox(value2);
for(int i=0;i<60;i++)
value3[i]=String.valueOf(i);
cco=new JComboBox(value3);
for(int i=0;i<100;i++)
value4[i]=String.valueOf(i);
ccc=new JComboBox(value4);
int cnt=0;
for(int i=100;i<150;i++)
value5[cnt]=String.valueOf(i);
cnt++;
abc=new JComboBox(value5);
l2.setFont(f1);
l2.setForeground( Color.BLUE);
l3.setFont(f1);
l3.setForeground(Color.BLUE);
l4.setFont(f1);
l4.setForeground(Color.BLUE);
l7.setFont(f1);
l7.setForeground(Color.BLUE);
l5.setFont(f1);
l5.setForeground(Color.BLUE);
bsubmit=new JButton("Register",icon0);
bsubmit.addActionListener(this);
bsubmit.setFont(f1);
breset=new JButton("Back",icon1);
breset.addActionListener(this);
breset.setFont(f1);
bsubmit1=new JButton("Showall",icon2);
bsubmit1.addActionListener(this);
bsubmit1.setFont(f1);
c.add(l1);c.add(new JLabel(""));c.add(tid);
c.add(l2);c.add(new JLabel(""));c.add(cmo);
c.add(l3);c.add(new JLabel(""));c.add(cmu);
c.add(l4);c.add(new JLabel(""));c.add(cco);
c.add(l7);c.add(new JLabel(""));c.add(abc);
c.add(l5);c.add(new JLabel(""));c.add(ccc);
c.add(bsubmit);c.add(breset);c.add(bsubmit1);
setSize(800, 500);
setLocation(300,100);
setResizable(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
if(ae.getSource()==bsubmit)
if(con==JOptionPane.YES_OPTION)
String A1=tid.getText();
B1=(String)cmo.getSelectedItem();
C1=(String)cmu.getSelectedItem();
String D1=(String)cco.getSelectedItem();
F=(String)abc.getSelectedItem();
String E=(String)ccc.getSelectedItem();
int b=tr1.RRegValid(r1);
if(b != -1)
JOptionPane.showMessageDialog(this, "Registration No
already exist");
//tid5.setText("");
else
String reg="^[a-zA-Z]";
if(result !=null)
try
try
FileInputStream fin=new
FileInputStream("Regi5.dat");
ObjectInputStream oin=new
ObjectInputStream(fin);
list1=(ArrayList<EditResultInput>)oin.readObject();
}catch(Exception e)
list1=new ArrayList<EditResultInput>();
EditResultInput r=new
EditResultInput(A1,B1,C1,D1,F,E);
list1.add(r);
FileOutputStream fout=new
FileOutputStream("Regi5.dat");
oout.writeObject(list1);
catch(Exception e)
System.out.println("Error : "+e);
else
tid.setText("");
JOptionPane.showMessageDialog(this,"Invalid Name..");
else if(ae.getSource()==bsubmit1)
new EditResultDisplay();
else if(ae.getSource()==breset)
dispose();
//EditResultDisplay
EditResultDisplay ()
super("Display all");
String heading[]={"Name","class","section","rollno","registration_no","marks"};
try
list1=(ArrayList<EditResultInput>)oin.readObject();
int r=0,c=0;
for(EditResultInput re : list1)
data[r][0]=re.getName();
data[r][1]=re.getClas();
data[r][2]=re.getSection();
data[r][3]=re.getRollno();
data[r][4]=re.getRegistration();
data[r][5]=re.getMarks();
r++;
c=0;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//EditResultInput
super();
this.name = name;
this.clas=clas;
this.section=section;
this.rollno=rollno;
this.registration=registration;
this.marks=marks;
public EditResultInput()
return name;
this.name = name;
return clas;
this.clas = clas;
return section;
this.section = section;
return rollno;
this.rollno = rollno;
return registration;
this.registration = registration;
return marks;
this.marks = marks;
//EPasswd
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLACK);
Question=new JComboBox(Squestion);
Question.addItemListener(this);
l2.setFont(f1);
l2.setForeground(Color.BLUE);
l3.setFont(f1);
l3.setForeground(Color.BLUE);
tid.setFont(f1);
bsubmit=new JButton("Back",icon0);
bsubmit.setFont(f2);
bsubmit.addActionListener(this);
breset=new JButton("Next",icon1);
breset.setFont(f2);
breset.addActionListener(this);
c.add(l1);c.add(new JLabel(""));
c.add(l2);c.add(Question);
c.add(l3);
c.add(bsubmit);
c.add(breset);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
String id1=FPasswd.id;
String jq=(String)Question.getSelectedItem();
try
list=(ArrayList<StudentRegistration>)oin.readObject();
int flag=0;
for(StudentRegistration re : list)
if(id1.equals(re.getUserid())&&(jq.equals(re.getSquestion())))
flag=1;
if(flag==1)
else
catch(Exception e)
e.printStackTrace();
if(ae.getSource()==breset)
String ans=tid.getText();
String id1=FPasswd.id;
try
list=(ArrayList<StudentRegistration>)oin.readObject();
int flag=0;
for(StudentRegistration re : list)
if(id1.equals(re.getUserid())&&(ans.equals(re.getSanswer())))
// l2=new JLabel(re.getSquestion());
flag=1;
if(flag==1)
dispose();
else
JOptionPane.showMessageDialog(this,"Incorrect Answer");
tid.setText("");
catch(Exception e)
e.printStackTrace();
else if(ae.getSource()==bsubmit)
dispose();
//FeeAcc
//CREATING BUTTONS
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
c.add(b1);
c.add(b2);
c.add(b3);
c.add(b5);
c.add(b4);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b1)
dispose();
else if(ae.getSource()==b3)
dispose();
else if(ae.getSource()==b4)
dispose();
else if(ae.getSource()==b2)
else if(ae.getSource()==b5)
dispose();
//FPasswd
//ArrayList<PasswdF> list;
super(title);
//list=new ArrayList<PasswdF>();
Container c=getContentPane();
c.setLayout(new GridLayout(5,2));
l1.setFont(f);
l1.setForeground(Color.BLACK);
l2.setFont(f1);
l2.setForeground(Color.BLUE);
tid.setFont(f1);
bsubmit=new JButton("Back",icon0);
bsubmit.setFont(f2);
bsubmit.addActionListener(this);
breset=new JButton("Next",icon1);
breset.setFont(f2);
breset.addActionListener(this);
c.add(l1);c.add(new JLabel(""));
c.add(l2);
c.add(bsubmit);
c.add(breset);
setSize(530, 350);
setLocation(300,200);
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
if(ae.getSource()==breset)
id=tid.getText();
try
list=(ArrayList<StudentRegistration>)oin.readObject();
int flag=0;
for(StudentRegistration re : list)
if(id.equals(re.getUserid()))
flag=1;
if(flag==1)
dispose();
else
JOptionPane.showMessageDialog(this,"Invalid ID");
catch(Exception e)
e.printStackTrace();
else if(ae.getSource()==bsubmit)
dispose();
//FrontPage
super(title);
Container c=getContentPane();
c.setLayout(new GridLayout(2,2));
bsubmit=new JButton("Administrator",icon0);
breset=new JButton("Student",icon1);
breset.addActionListener(this);
bsubmit.addActionListener(this);
bsubmit.setFont(f);
breset.setFont(f);
c.add(bsubmit);c.add(breset);
setSize(400, 300);
setLocation(300,200);
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
if(ae.getSource()==breset)
dispose();
if(ae.getSource()==bsubmit)
dispose();
//IAChoose
//CREATING BUTTONS
b1.addActionListener(this);
b4=new JButton("Back");
b4.addActionListener(this);
c.add(b1);
c.add(b2);
c.add(b3);
c.add(b4);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b4)
dispose();
//InstituteActivity
super(title);
Container c=getContentPane();//
b1.setFont(f);
b1.addActionListener(this);
b2.setFont(f);
b2.addActionListener(this);
b3.setFont(f);
b3.addActionListener(this);
b4=new JButton("Back",icon0);
b4.setFont(f);
b4.addActionListener(this);
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b4)
new StudentMenu("StudentMenu");
dispose();
else if(ae.getSource()==b3)
new InstituteCoCuricularActivity("InstituteCoCuricularActivity");
dispose();
else if(ae.getSource()==b2)
dispose();
else if(ae.getSource()==b1)
dispose();
//InstituteActivityT
super(title);
Container c=getContentPane();//
b1.setFont(f);
b1.addActionListener(this);
b2.setFont(f);
b2.addActionListener(this);
b3.setFont(f);
b3.addActionListener(this);
b4=new JButton("Back",icon0);
b4.setFont(f);
b4.addActionListener(this);
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b4)
new TAcc1("StudentMenu");
dispose();
else if(ae.getSource()==b3)
new InstituteCoCuricularActivityT("InstituteCoCuricularActivity");
dispose();
else if(ae.getSource()==b2)
dispose();
else if(ae.getSource()==b1)
dispose();
//InstituteCoCuricuralActivity
private JLabel
l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18,l19,l20,l21,l22,l23,l24,l25,l26,l
27,l28,l29;
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLUE);
l2.setFont(f);
l2.setForeground(Color.BLUE);
l3.setFont(f);
l4.setFont(f);
l4.setForeground(Color.BLUE);
l5.setFont(f);
l6.setFont(f);
l6.setForeground(Color.BLUE);
l7.setFont(f);
l8.setFont(f);
l9.setFont(f);
l9.setForeground(Color.BLUE);
l10.setFont(f);
l11.setFont(f);
l11.setForeground(Color.BLUE);
l12.setFont(f);
l13.setFont(f);
l13.setForeground(Color.BLUE);
l14.setFont(f);
l15.setFont(f);
// l16.setFont(f);
l17.setFont(f);
l17.setForeground(Color.BLUE);
l18.setFont(f);
l19.setFont(f);
l19.setForeground(Color.BLUE);
l20.setFont(f);
l21.setFont(f);
l21.setForeground(Color.BLUE);
l22.setFont(f);
l24.setFont(f);
l25.setFont(f);
l25.setForeground(Color.BLUE);
l26.setFont(f);
l27.setFont(f2);
l28.setFont(f2);
l29.setFont(f2);
b1=new JButton("Back",icon0);
b1.setFont(f1);
b1.addActionListener(this);
c.add(l1);c.add(new JLabel(""));
c.add(l2);c.add(l3);
c.add(l4);c.add(l5);
c.add(l6);c.add(l7);
c.add(new JLabel(""));c.add(l8);
c.add(l9);c.add(l10);
c.add(l11);c.add(l12);
c.add(l13);c.add(l14);
c.add(new JLabel(""));c.add(l15);
c.add(l17);c.add(l18);
c.add(l19);c.add(l20);
c.add(l21);c.add(l22);
c.add(new JLabel(""));c.add(l24);
c.add(l25);c.add(l26);
c.add(l27);c.add(l28);
c.add(new JLabel(""));c.add(l29);
c.add(b1);c.add(new JLabel(""));
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b1)
dispose();
//InstituteCoCuricularActivityT
private JLabel
l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18,l19,l20,l21,l22,l23,l24,l25,l26,l
27,l28,l29;
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLUE);
l2.setFont(f);
l2.setForeground(Color.BLUE);
l3.setFont(f);
l4.setFont(f);
l4.setForeground(Color.BLUE);
l5.setFont(f);
l6.setFont(f);
l6.setForeground(Color.BLUE);
l7.setFont(f);
l8.setFont(f);
l9.setFont(f);
l9.setForeground(Color.BLUE);
l10.setFont(f);
l11.setFont(f);
l11.setForeground(Color.BLUE);
l12.setFont(f);
l13.setFont(f);
l13.setForeground(Color.BLUE);
l14.setFont(f);
l15.setFont(f);
// l16.setFont(f);
l17.setFont(f);
l17.setForeground(Color.BLUE);
l18.setFont(f);
l19.setFont(f);
l19.setForeground(Color.BLUE);
l20.setFont(f);
l21.setFont(f);
l21.setForeground(Color.BLUE);
l22.setFont(f);
l24.setFont(f);
l25.setFont(f);
l25.setForeground(Color.BLUE);
l26.setFont(f);
l27.setFont(f2);
l28.setFont(f2);
l29.setFont(f2);
b1=new JButton("Back",icon0);
b1.setFont(f1);
b1.addActionListener(this);
c.add(l1);c.add(new JLabel(""));
c.add(l2);c.add(l3);
c.add(l4);c.add(l5);
c.add(l6);c.add(l7);
c.add(new JLabel(""));c.add(l8);
c.add(l9);c.add(l10);
c.add(l11);c.add(l12);
c.add(l13);c.add(l14);
c.add(new JLabel(""));c.add(l15);
c.add(l17);c.add(l18);
c.add(l19);c.add(l20);
c.add(l21);c.add(l22);
c.add(new JLabel(""));c.add(l24);
c.add(l25);c.add(l26);
c.add(l27);c.add(l28);
c.add(new JLabel(""));c.add(l29);
c.add(b1);c.add(new JLabel(""));
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b1)
dispose();
//InstituteSchedule
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLUE);
l2.setFont(f);
l3.setFont(f);
l3.setForeground(Color.BLUE);
l4.setFont(f);
l5.setFont(f);
l5.setForeground(Color.BLUE);
l6.setFont(f);
l7.setFont(f);
l7.setForeground(Color.BLUE);
l8.setFont(f);
l9.setFont(f);
l9.setForeground(Color.BLUE);
l10.setFont(f);
l11.setFont(f);
l11.setForeground(Color.BLUE);
l12.setFont(f);
b1=new JButton("Back",icon0);
b1.setFont(f1);
b1.addActionListener(this);
c.add(l1);c.add(l2);
c.add(l3);c.add(l4);
c.add(l5);c.add(l6);
c.add(l7);c.add(l8);
c.add(l9);c.add(l10);
c.add(l11);c.add(l12);
c.add(b1);c.add(new JLabel(""));
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b1)
dispose();
//InstituteScheduleT
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLUE);
l2.setFont(f);
l3.setFont(f);
l3.setForeground(Color.BLUE);
l4.setFont(f);
l5.setFont(f);
l5.setForeground(Color.BLUE);
l6.setFont(f);
l7.setFont(f);
l7.setForeground(Color.BLUE);
l8.setFont(f);
l9.setFont(f);
l9.setForeground(Color.BLUE);
l10.setFont(f);
l11.setFont(f);
l11.setForeground(Color.BLUE);
l12.setFont(f);
b1=new JButton("Back",icon0);
b1.setFont(f1);
b1.addActionListener(this);
c.add(l1);c.add(l2);
c.add(l3);c.add(l4);
c.add(l5);c.add(l6);
c.add(l7);c.add(l8);
c.add(l9);c.add(l10);
c.add(l11);c.add(l12);
c.add(b1);c.add(new JLabel(""));
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b1)
dispose();
//InstituteVocation
private JLabel
l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18,l19,l20,l21,l22,l23,l24,l25,l26,l
27,l28,l29;
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLUE);
l2.setFont(f);
l2.setForeground(Color.BLUE);
l3.setFont(f);
l4.setFont(f);
l4.setForeground(Color.BLUE);
l5.setFont(f);
l6.setFont(f);
l6.setForeground(Color.BLUE);
l7.setFont(f);
l8.setFont(f);
l9.setFont(f);
l9.setForeground(Color.BLUE);
l10.setFont(f);
l11.setFont(f);
l11.setForeground(Color.BLUE);
l12.setFont(f);
l13.setFont(f);
l13.setForeground(Color.BLUE);
l14.setFont(f);
l15.setFont(f);
l16.setFont(f);
l17.setFont(f);
l17.setForeground(Color.BLUE);
l18.setFont(f);
l19.setFont(f);
l19.setForeground(Color.BLUE);
l20=new JLabel("10th-Holi");
l20.setFont(f);
l21.setFont(f);
l21.setForeground(Color.BLUE);
l22.setFont(f);
l23.setFont(f);
l23.setForeground(Color.BLUE);
l24.setFont(f);
l25.setFont(f);
l25.setForeground(Color.BLUE);
l26.setFont(f);
l27.setFont(f2);
l28.setFont(f2);
l29.setFont(f2);
b1=new JButton("Back",icon0);
b1.setFont(f1);
b1.addActionListener(this);
c.add(l1);c.add(new JLabel(""));
c.add(l2);c.add(l3);
c.add(l4);c.add(l5);
c.add(l6);c.add(l7);
c.add(new JLabel(""));c.add(l8);
c.add(l9);c.add(l10);
c.add(l11);c.add(l12);
c.add(l13);c.add(l14);
c.add(new JLabel(""));c.add(l15);
c.add(new JLabel(""));c.add(l16);
c.add(l17);c.add(l18);
c.add(l19);c.add(l20);
c.add(l21);c.add(l22);
c.add(l23);c.add(l24);
c.add(l25);c.add(l26);
c.add(l27);c.add(l28);
c.add(new JLabel(""));c.add(l29);
c.add(b1);c.add(new JLabel(""));
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b1)
dispose();
//InstituteVocationT
private JLabel
l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15,l16,l17,l18,l19,l20,l21,l22,l23,l24,l25,l26,l
27,l28,l29;
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLUE);
l2.setFont(f);
l2.setForeground(Color.BLUE);
l3.setFont(f);
l4.setFont(f);
l4.setForeground(Color.BLUE);
l5.setFont(f);
l6.setFont(f);
l6.setForeground(Color.BLUE);
l7.setFont(f);
l8.setFont(f);
l9.setFont(f);
l9.setForeground(Color.BLUE);
l10.setFont(f);
l11.setFont(f);
l11.setForeground(Color.BLUE);
l12.setFont(f);
l13.setFont(f);
l13.setForeground(Color.BLUE);
l14.setFont(f);
l15.setFont(f);
l16.setFont(f);
l17.setFont(f);
l17.setForeground(Color.BLUE);
l18.setFont(f);
l19.setFont(f);
l19.setForeground(Color.BLUE);
l20=new JLabel("10th-Holi");
l20.setFont(f);
l21.setFont(f);
l21.setForeground(Color.BLUE);
l22.setFont(f);
l23.setFont(f);
l23.setForeground(Color.BLUE);
l24.setFont(f);
l25.setFont(f);
l25.setForeground(Color.BLUE);
l26.setFont(f);
l27.setFont(f2);
l28.setFont(f2);
l29.setFont(f2);
b1=new JButton("Back",icon0);
b1.setFont(f1);
b1.addActionListener(this);
c.add(l1);c.add(new JLabel(""));
c.add(l2);c.add(l3);
c.add(l4);c.add(l5);
c.add(l6);c.add(l7);
c.add(new JLabel(""));c.add(l8);
c.add(l9);c.add(l10);
c.add(l11);c.add(l12);
c.add(l13);c.add(l14);
c.add(new JLabel(""));c.add(l15);
c.add(new JLabel(""));c.add(l16);
c.add(l17);c.add(l18);
c.add(l19);c.add(l20);
c.add(l21);c.add(l22);
c.add(l23);c.add(l24);
c.add(l25);c.add(l26);
c.add(l27);c.add(l28);
c.add(new JLabel(""));c.add(l29);
c.add(b1);c.add(new JLabel(""));
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b1)
dispose();
//ManageLibAcc
//CREATING BUTTONS
b1=new JButton("ADD",icon4);
b1.addActionListener(this);
b2.addActionListener(this);
b3.addActionListener(this);
b4.addActionListener(this);
b5.addActionListener(this);
c.add(b1);
c.add(b2);
c.add(b3);
c.add(b4);
c.add(b5);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b1)
dispose();
else if(ae.getSource()==b2)
new DisplayAllLib();
else if(ae.getSource()==b3)
dispose();
else if(ae.getSource()==b4)
dispose();
else if(ae.getSource()==b5)
dispose();
//NewLib
private String r;
public NewLib(String name, String class1, String sec,String rollno, String reg,
String bdraw, String dow,String r) {
super();
this.name = name;
this.class1 = class1;
this.sec = sec;
this.rollno = rollno;
this.reg = reg;
this.bdraw = bdraw;
this.dow = dow;
this.r=r;
public NewLib()
return name;
this.name = name;
return class1;
this.class1 = class1;
return sec;
this.sec = sec;
return rollno;
this.rollno = rollno;
return reg;
this.reg = reg;
return bdraw;
this.bdraw = bdraw;
return dow;
this.dow = dow;
return r;
this.r = r;
//NewPass
tpass1=new JPasswordField(20);
tpass2=new JPasswordField(20);
l1.setFont(f1);
l1.setForeground(Color.BLUE);
l2.setFont(f2);
l2.setForeground(Color.BLUE);
l3.setFont(f3);
l3.setForeground(Color.RED);
//CREATING BUTTONS
b2=new JButton("Save",icon1);
b2.addActionListener(this);
b1=new JButton("Back",icon0);
b1.addActionListener(this);
c.add(l1);c.add(tpass1);
c.add(new JLabel(""));c.add(l3);
c.add(l2);c.add(tpass2);
c.add(b1);c.add(b2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b1)
dispose();
else if(ae.getSource()==b2)
s1 = tpass1.getText();
s2 = tpass2.getText();
String reg="^[a-zA-z_0-9]";
if(result == null)
tpass1.setText("");
tpass2.setText("");
JOptionPane.showMessageDialog(this,"password invalid");
else{
if(s1.equals(s2)){
int con=JOptionPane.showConfirmDialog(this,"changepassword?");
if(con==JOptionPane.YES_OPTION)
new UpdatePasswd1();
JOptionPane.showMessageDialog(this,"password changed");
// dispose();
else if(con==JOptionPane.NO_OPTION)
tpass1.setText("");
tpass2.setText("");
else{
tpass2.setText("");
//NPasswd
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLUE);
tpass1=new JPasswordField(20);
tpass1.setFont(f);
l2.setFont(f1);
l2.setForeground(Color.BLUE);
tpass2=new JPasswordField(20);
tpass2.setFont(f1);
l3.setFont(f4);
l3.setForeground(Color.RED);
bsubmit=new JButton("Save",icon1);
bsubmit.setFont(f2);
bsubmit.addActionListener(this);
back=new JButton("Back",icon0);
back.setFont(f2);
back.addActionListener(this);
c.add(l1);c.add(tpass1);
c.add(new JLabel(""));c.add(l3);
c.add(l2);c.add(tpass2);
c.add(back); c.add(bsubmit);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==back)
dispose();
else if(ae.getSource()==bsubmit)
s1 = tpass1.getText();
s2 = tpass2.getText();
String reg="^[a-zA-z_0-9]";
if(result == null)
tpass1.setText("");
tpass2.setText("");
JOptionPane.showMessageDialog(this,"password invalid");
else{
if(s1.equals(s2)){
int con=JOptionPane.showConfirmDialog(this,"changepassword?");
if(con==JOptionPane.YES_OPTION)
//String id1=FPasswd.id;
//StudentRegistration rg=new
StudentRegistration(A1,B1,C1,D1,E,F,G,dob,H,I,J,K,L,M,N,O);
//int a = sc1.CheckIDValid(rg);
//if(a!=-1){
//int indx=UpdatePasswd.x;
new UpdatePasswd();
JOptionPane.showMessageDialog(this,"password updated");
dispose();
//}
else if(con==JOptionPane.NO_OPTION)
tpass1.setText("");
tpass2.setText("");
else{
tpass2.setText("");
//OldPass
tpass=new JPasswordField(20);
l1.setFont(f);
l1.setForeground(Color.BLUE);
//CREATING BUTTONS
//l1.setFont(f);
//l1.setForeground(Color.BLUE);
b2=new JButton("Next",icon0);
b2.setFont(f1);
b2.addActionListener(this);
b1=new JButton("Back",icon1);
b1.setFont(f1);
b1.addActionListener(this);
tpass=new JPasswordField(20);
c.add(l1);c.add(tpass);
c.add(b1);
c.add(b2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b1)
dispose();
else if(ae.getSource()==b2)
String pass1=tpass.getText();
String pass2=WelcomeStudent.pass;
if(pass1.equals(pass2))
dispose();
else
tpass.setText("");
JOptionPane.showMessageDialog(this,"Invalid Password");
//PAcc1
public PAcc1(){
super(title);
Container c=getContentPane();//
b1.setFont(f);
b1.addActionListener(this);
b2.setFont(f);
b2.addActionListener(this);
b3.setFont(f);
b3.addActionListener(this);
b4.setFont(f);
b4.addActionListener(this);
b5.setFont(f);
b5.addActionListener(this);
bsubmit.setFont(f1);
bsubmit.addActionListener(this);
c.add(bsubmit);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
if(ae.getSource()==b2)
dispose();
else if(ae.getSource()==b1)
new Display();
else if(ae.getSource()==b3)
new DisplayAllTime();
else if(ae.getSource()==b5)
new DisplayAllCRegi();
else if(ae.getSource()==b4)
dispose();
else if(ae.getSource()==bsubmit)
dispose();
//Passwd
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLACK);
l2.setFont(f1);
l2.setForeground(Color.BLUE);
tid.setFont(f1);
bsubmit=new JButton("Back",icon0);
bsubmit.setFont(f2);
breset=new JButton("Next",icon1);
breset.setFont(f2);
c.add(l1);c.add(new JLabel(""));
c.add(l2);
c.add(tid);
c.add(bsubmit);
c.add(breset);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//PasswdF
super();
this.id = id;
public PasswdF()
return id;
this.id = id;
//PIChoose
//CREATING BUTTONS
b1.addActionListener(this);
b2.addActionListener(this);
b3=new JButton("Back",icon0);
b3.addActionListener(this);
c.add(b1);
c.add(b2);
c.add(b3);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b3)
dispose();
else if(ae.getSource()==b1)
// dispose();
else if(ae.getSource()==b2)
dispose();
//RegCheck
public RegCheck()
super();
String s1=TComment.F1;
String s2=TComment.C1;
String s3=TComment.D1;
//String heading[]={"Name","Guardian","Guardian
Name","Income","Class","Section","Roll","Gender","Date Of
Birth","City","Bgrp","Address","Userid","Password","Cpassword","Squestion","Sanswer
"};
try
list=(ArrayList<EditResultInput>)oin.readObject();
//int r=0,c=0;
for(EditResultInput re : list)
if(s1.equals(re.getRegistration())){
if(s2.equals(re.getClas()))
if(s3.equals(re.getSection())){
flag=1;
}catch(Exception e)
e.printStackTrace();
//Registration1
super();
this.name = name;
this.class1 = class1;
this.sec= sec;
this.roll = roll;
this.reg = reg;
this.dos = dos;
this.voucher =voucher;
this.paymonth=paymonth;
this.due=due;
public Registration1()
return name;
this.name = name;
return class1;
this.class1=class1;
return sec;
this.sec = sec;
return roll;
this.roll = roll;
return reg;
this.reg = reg;
return dos;
this.dos = dos;
return voucher;
this.voucher = voucher;
return paymonth;
this.paymonth = paymonth;
return due;
this.due = due;
//ResultReg
super(title);
Container c=getContentPane();
c.setLayout(new GridLayout(2,2));
l1.setFont(f1);
l1.setForeground(Color.BLUE);
tid=new JTextField(20);
bsubmit1=new JButton("Back",icon0);
bsubmit1.addActionListener(this);
bsubmit2=new JButton("Search",icon1);
bsubmit2.addActionListener(this);
bsubmit1.setFont(f1);
bsubmit2.setFont(f1);
c.add(l1);c.add(tid);
c.add(bsubmit1);c.add(bsubmit2);
setSize(400, 200);
setLocation(300,200);
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
if(ae.getSource()==bsubmit2)
rg=tid.getText();
/* if(DisplayResult.flag!=1)
JOptionPane.showMessageDialog(this,"Invalid RegNo");
}*/
else if(ae.getSource()==bsubmit1)
dispose();
//ResultReg1
super(title);
Container c=getContentPane();
c.setLayout(new GridLayout(2,2));
l1.setFont(f1);
l1.setForeground(Color.BLUE);
tid=new JTextField(20);
bsubmit1=new JButton("Back",icon0);
bsubmit2=new JButton("Search",icon1);
bsubmit1.setFont(f1);
bsubmit1.addActionListener(this);
bsubmit2.setFont(f1);
bsubmit2.addActionListener(this);
c.add(l1);c.add(tid);
c.add(bsubmit1);c.add(bsubmit2);
setSize(400, 200);
setLocation(300,200);
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
if(ae.getSource()==bsubmit2)
reg=tid.getText();
else if(ae.getSource()==bsubmit1)
dispose();
//RollCheck
public RollCheck()
super();
String s1=StudentOfficialInfo.gc;
String s2=StudentOfficialInfo.gs;
String s3=StudentOfficialInfo.gr;
//String heading[]={"Name","Guardian","Guardian
Name","Income","Class","Section","Roll","Gender","Date Of
Birth","City","Bgrp","Address","Userid","Password","Cpassword","Squestion","Sanswer
"};
ArrayList<StudentRegistration> list=new
ArrayList<StudentRegistration>();
try
list=(ArrayList<StudentRegistration>)oin.readObject();
//int r=0,c=0;
for(StudentRegistration re : list)
if(s1.equals(re.getClas())){
if(s2.equals(re.getSection()))
if(s3.equals(re.getRoll()))
flag=1;
catch(Exception e)
e.printStackTrace();
//SearchID1
super("Display All");
s1=WelcomeStudent.id;
s2=WelcomeStudent.pass;
String heading[]={"Name","Guardian","Guardian
Name","Income","Class","Section","Roll","Gender","Date Of
Birth","City","Bgrp","Address","Userid","Password","Cpassword","Squestion","Sanswer
"};
ArrayList<StudentRegistration> list=new
ArrayList<StudentRegistration>();
try
list=(ArrayList<StudentRegistration>)oin.readObject();
int r=0,c=0;
for(StudentRegistration re : list)
if(s1.equals(re.getUserid())&&(s2.equals(re.getPassword())))
data[r][0]=re.getName();
data[r][1]=re.getGuardian();
data[r][2]=re.getGuardianname();
data[r][3]=re.getIncome();
data[r][4]=re.getClas();
data[r][5]=re.getSection();
data[r][6]=re.getRoll();
data[r][7]=re.getGender();
data[r][8]=re.getDob();
data[r][9]=re.getCity();
data[r][10]=re.getBgrp();
data[r][11]=re.getAddress();
data[r][12]=re.getUserid();
data[r][13]=re.getPassword();
data[r][14]=re.getCpassword();
data[r][15]=re.getSquestion();
data[r][16]=re.getSanswer();
r++;
c=0;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(new JLabel("personal
information"),BorderLayout.NORTH);
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//SearchStudentInAcc
t1=new JTextField(20);
//CREATING BUTTONS
b1=new JButton("Back",icon0);
b1.addActionListener(this);
b2=new JButton("Search",icon1);
b2.addActionListener(this);
l1.setFont(f1);
l1.setForeground(Color.BLUE);
c.add(l1);c.add(t1);
c.add(b1);c.add(b2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b2)
rg=t1.getText();
if(DisplaySingleAcc.flag!=1)
JOptionPane.showMessageDialog(this,"Invalid RegNo");
else if(ae.getSource()==b1)
dispose();
//SearchStudentInLib
t1=new JTextField(20);
//CREATING BUTTONS
b1=new JButton("Back",icon0);
b1.addActionListener(this);
b2=new JButton("Search",icon1);
b2.addActionListener(this);
l1.setFont(f1);
l1.setForeground(Color.BLUE);
c.add(l1);c.add(t1);
c.add(b1);c.add(b2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b2)
rg=t1.getText();
if(DisplaySingleLib.flag!=1)
JOptionPane.showMessageDialog(this,"Invalid RegNo");
else if(ae.getSource()==b1)
dispose();
//SearchTComment
super("Display All");
s1=ResultReg1.reg;
String
heading[]={"Name","rollno","class","sec","registration_no","comment"};
try
list1=(ArrayList<TCommentInput>)oin.readObject();
int r=0,c=0;
for(TCommentInput re : list1)
if(s1.equals(re.getRegistration()))
data[r][0]=re.getName();
data[r][1]=re.getRollno();
data[r][2]=re.getClas();
data[r][3]=re.getSec();
data[r][4]=re.getRegistration();
data[r][5]=re.getComment();
r++;
r++;
c=0;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
e.printStackTrace();
//ShowDetail
for(int i=0;i<=9;i++)
cvalue[i]=String.valueOf(i+1);
c1=new JComboBox(cvalue);
String ctvalue[]={"A","B","C","D"};
c2=new JComboBox(ctvalue);
//CREATING BUTTONS
b3=new JButton("Back");
l1.setFont(f1);
l1.setForeground(Color.BLUE);
l2.setFont(f2);
l2.setForeground(Color.BLUE);
c.add(l1);c.add(new JLabel(""));c.add(c1);
c.add(l2);c.add(new JLabel(""));c.add(c2);
c.add(l3);c.add(new JLabel(""));c.add(c3);
c.add(b1);c.add(new JLabel(""));c.add(b2);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);//Mandatory line
Compulsary if window is close prog terminate
if(ae.getSource()==b1)
dispose();
//WelcomeStudent
super(title);
Container c=getContentPane();//
l1.setFont(f);
l1.setForeground(Color.BLACK);
l2.setFont(f1);
l2.setForeground(Color.BLUE);
tid.setFont(f1);
l3.setFont(f1);
l3.setForeground(Color.BLUE);
register=new JButton("Login",icon2);
register.addActionListener(this);
register.setFont(f2);
home=new JButton("Home",icon0);
home.setFont(f2);
home.addActionListener(this);
frgtpass.setFont(f2);
frgtpass.addActionListener(this);
newacc.setFont(f2);
newacc.addActionListener(this);
c.add(l1);c.add(new JLabel(""));
c.add(l2);c.add(tid);
c.add(l3);c.add(tpass);
c.add(register);c.add(home);
c.add(frgtpass);c.add(newacc);
setSize(600, 450);
//c.setBackground(c1);
setLocation(300,200);
setResizable(false);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
if(ae.getSource()==newacc)
dispose();
else if(ae.getSource()==register)
id=tid.getText();
pass=tpass.getText();
try
list=(ArrayList<StudentRegistration>)oin.readObject();
int flag=0;
for(StudentRegistration re : list)
if(id.equals(re.getUserid())&&(pass.equals(re.getPassword())))
flag=1;
if(flag==1)
dispose();
else
JOptionPane.showMessageDialog(this,"Invalid data");
catch(Exception e)
e.printStackTrace();
else if(ae.getSource()==frgtpass)
dispose();
else if(ae.getSource()==home)
dispose();
//ComplainFrame
ArrayList<Complain> list;
super(title);
list=new ArrayList<Complain>();
Container c=getContentPane();
c.setLayout(new GridLayout(6,2));
tid=new JTextField(20);
tadd=new JTextArea(4,20);
bsubmit=new JButton("Register",icon0);
bsubmit.addActionListener(this);
breset=new JButton("Back",icon1);
breset.addActionListener(this);
l1.setFont(f);
l1.setForeground(Color.RED);
l2.setFont(f1);
l2.setForeground(Color.BLUE);
l4.setFont(f1);
l4.setForeground(Color.BLUE);
c.add(l1);c.add(new JLabel(""));
c.add(l2);c.add(tid);
c.add(l4);c.add(tapan);
c.add(bsubmit);c.add(breset);
setSize(450, 325);
setLocation(200,200);
setResizable(false);
//setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
if(ae.getSource()==bsubmit)
if(con==JOptionPane.YES_OPTION)
String id=tid.getText();
String add=tadd.getText();
//this.setVisible(false);
try
try
FileInputStream fin=new
FileInputStream("Regi10.dat");
ObjectInputStream oin=new
ObjectInputStream(fin);
list=(ArrayList<Complain>)oin.readObject();
catch(Exception e)
list=new ArrayList<Complain>();
list.add(r);
oout.writeObject(list);
catch(Exception e)
System.out.println("Error : "+e);
else if(ae.getSource()==breset)
dispose();
//Complain
super();
this.complaint = complaint;
this.complain1 = complain1;
public Complain()
return complaint;
this.complaint = complaint;
return complain1;
this.complain1 = complain1;
//DisplayAllCRegi
public DisplayAllCRegi()
super("Display All");
try
list=(ArrayList<Complain>)oin.readObject();
int r=0,c=0;
for(Complain re : list)
data[r][0]=re.getComplaint();
data[r][1]=re.getComplain1();
r++;
c=0;
Container con=getContentPane();
con.setLayout(new BorderLayout());
con.add(jsp,BorderLayout.CENTER);
setSize(250, 300);
setLocation(200, 200);
setVisible(true);
catch(Exception e)
System.out.println(e);
//WelcomeFrame
super(title);
Container c=getContentPane();
jpf=new JPanel();
click.setFont(f);
click.addActionListener(this);
jpf.add(click);
add(jlf, BorderLayout.CENTER);
add(jpf, BorderLayout.SOUTH);
setSize(444,444);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setVisible(true);
setSize(1000, 700);
setLocation(175,20);
setResizable(true);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setVisible(true);
if(ae.getSource()==click)
new FrontPage("welcome");
dispose();