Pice of Shit
Pice of Shit
Frame: JFrame
public Login_Page() {
initComponents();
try{
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection(db, "root",
"kvuc"); stm=con.createStatement();}
catch (Exception e)
{JOptionPane.showMessageDialog(null,e.getMessge());
}
}
private void
jButton1ActionPerformed(java.awt.event.ActionEvent
evt) { // TODO add your handling code here:
loginframe.set Visible(true); }
private void
jButton2ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
System.exit(0); }
Frame: LoginFrame
private void
jButton5ActionPerformed(java.awt.event.ActionEvent
evt) {// TODO add your handling code here:
exhibition.set Visible(true);
loginframe.dispose();
private void
jButton6ActionPerformed(java.awt.event.ActionEvent
evt) {// TODO add your handling code here:
libraryservices.set Visible(true);
loginframe.dispose();
private void
jButton7ActionPerformed(java.awt.event.ActionEvent
evt) {// TODO add your handling code here:
valueedu.set Visible(true);
loginframe.dispose();
private void
jButton8ActionPerformed(java.awt.event.ActionEvent
evt) {// TODO add your handling code here:
guidance.set Visible(true);
loginframe.dispose();
private void
jButton9ActionPerformed(java.awt.event.ActionEvent
evt) {// TODO add your handling code here:
technology.set Visible(true);
loginframe.dispose();
privatevoidjButton101ActionPerformed(java.awt.eve
nt.ActionEventevt) {// TODO add your handling code
here:
photogalary.set Visible(true);
loginframe.dispose();
jButton 103.set Visible(false);
jButton 105.set Visible(false);
jButton 107.set Visible(false);
jButton 108.set Visible(false);
jButton 110.set Visible(false);
jButton 115.setVisible(false);
private void
jButton18ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
if(jRadioButton1.isSelected()){
studentlogin.set Visible(true);
loginframe.dispose();}
else if(jRadioButton2.isSelected())
{ staffpassword.set Visible(true);
loginframe.dispose();}
jRadioButton1.setSelected(false);
jRadioButton2.setSelected(false);
}
private void
jButton15ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
loginframe.dispose(); }
Frame: StaffPassword
privatevoidjButton10ActionPerformed(java.awt.event
.ActionEventevt) {// TODO add your handling code
here:
String u= jTextField1.getText();
Stringp=newString(jPasswordField1.getPassword());
if(u.equals("kvuc"))
{if(p.equals("12345"))
{stafflogin.setVisible(true) staffpassword.dispose();}
else
JOptionPane.showMessageDialog(null,"You Have
Entered Incorrect Password"); }
else
JOptionPane.showMessageDialog(null,"You Have
Entered Incorrect User ID");
jTextField1.setText("");
jPasswordField1.setText(""); }
Frame: StaffLogin
privatevoidjMenultem3MouseClicked(java.awt.event.
MouseEventevt)
{ // TODO add your handling code here:
studentall.setVisible(true);
privatevoidjMenultem2ActionPerformed(java.awt.ev
ent.ActionEventevt) {// TODO add your handling code
here:
stafflogin.dispose();
addteacher.setVisible(true);
privatevoidjMenultem4ActionPerformed(java.awt.ev
ent.ActionEventevt) { // TODO add your handling
code here:
addstudent.setVisible(true);
stafflogin.dispose();
privatevoidjMenultem10ActionPerformed(java.awt.e
vent.ActionEventevt) {// TODO add your handling
code here:
studentclass.setVisible(true);
stafflogin.dispose();
privatevoidjMenultem19ActionPerformed(java.awt.e
vent.ActionEventevt) {// TODO add your handling
code here:
stafflogin.dispose();
stbyadm.setVisible(true);
privatevoidjMenultem1ActionPerformed(java.awt.ev
ent.ActionEventevt) { // TODO add your handling
code here:
stafflogin.dispose();
staffall.setVisible(true);
privatevoidjMenultem7ActionPerformed(java.awt.ev
ent.ActionEventevt) { // TODO add your handling
code here:
stafflogin.dispose();
staffsub.setVisible(true);
privatevoidjMenultem8ActionPerformed(java.awt.ev
ent.ActionEvent
evt) {// TODO add your handling code here:
stafflogin.dispose();
staffpost.setVisible(true);
private void
jMenuItem13ActionPerformed(java.awt.event.Action
Eventevt) { // TODO add your handling code here:
stafflogin.dispose();
sfbyname.setVisible(true);
private void
jMenuItem14ActionPerformed(java.awt.event.Action
Eventevt) { // TODO add your handling code here:
stafflogin.dispose();
sfbypost.setVisible(true);
private void
jMenuItem16ActionPerformed(java.awt.event.Action
Eventevt){// TODO add your handling code here:
stafflogin.dispose();
sfbysub.setVisible(true);
private void
jButton28ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
stafflogin.dispose();
loginframe.setVisible(true);
}
Frame: Studentall
private void
jButton22ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable1.getModel();
try
{rs=stm.executeQuery("select * from student;");
int a,r,c;
String n,f,s,co;
while (rs.next()){
a=rs.getint("adm_no");
r=rs.getint("roll_no");
c=rs.getint("class");
n=rs.getString("name");
f=rs.getString("fathername");
s=rs.getString("section");
co=rs.getString("contact_no");
Object rec[]={a,r,n,f,c,s,co};
tm.addRow(rec); }
rs.close(); }
catch (Exception e){
JOptionPane.showMessageDialog(null,e.getMessage());
}
}
private void
jButton23ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable1.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0); }
private void
jButton24ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
studentall.dispose();
stafflogin.setVisible(true); }
Frame: Staffall
private void
jButton47ActionPerformed(java.awt.event.ActionEvent
evt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable8.getModel();
try
{rs=stm.executeQuery("select * from teacher;");
int t;
String n,p,s;
while (rs.next()){ t=rs.getint("teacher_id");
n=rs.getString("name");
p=rs.getString("post");
s=rs.getString("subject");
Object rec[]={t,n,p,s};
tm.addRow(rec); }
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage()
);
}
}
private void
jButton48ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable8.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0); }
private void
jButton49ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
staffall.dispose();
stafflogin.setVisible(true); }
Frame: Staffsubject
private void
jButton64ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
Frame: Staffpost
private void
jButton59ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable10.getModel();
Try
{rs=stm.executeQuery("select * from teacher
where post='pgt';");
int t;
String n,s;
while (rs.next())
{ t=rs.getint("teacher_id"); n=rs.getString("name");
s=rs.getString("subject");
Object rec[]={t,n,s];
tm.addRow(rec); }
rs.close();}
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMess
age());
}
}
private void
jButton60ActionPerformed(java.awt.event.ActionEve
nt){// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable10.getModel();
{rs=stm.executeQuery("select * from teacher where
post='tgt';");
int t;
String n,s;
while (rs.next()){
t=rs.getint("teacher_id");
n=rs.getString("name");
s=rs.getString("subject");
Object rec[]={t,n,s};
tm.addRow(rec);
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMess
age());
}
}
private void
jButton61ActionPerformed(java.awt.event.ActionEve
ntevt) { // TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable10.getModel();
Try
{rs=stm.executeQuery("select * from teacher
where post='prt';");
int t;
String n,s;
while (rs.next()){
t=rs.getint("teacher_id");
n=rs.getString("name");
s=rs.getString("subject");
Object rec[]={t,n,s);
tm.addRow(rec);
rs.close();
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMess
age());
}
}
private void
jButton61ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable10.getModel();
Try
{rs=stm.executeQuery("select * from teacher
where post='prt';");
int t;
String n,s;
while (rs.next()){
t=rs.getint("teacher_id");
n=rs.getString("name");
s=rs.getString("subject");
Object rec[]={t,n,s};
tm.addRow(rec); }
rs.close();}
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.get
Message());
}
}
private void
jButton54ActionPerformed(java.awt.event.Action
Eventevt) {// TODO add your handling code here:
DefaultTableModel tm=
(DefaultTableModel)jTable10.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0); }
private void
jButton55ActionPerformed(java.awt.event.Action
Eventevt) {// TODO add your handling code here:
staffpost.dispose();
stafflogin.setVisible(true); }
Frame: Staffclassteacher
private void
jButton81ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
private void
jButton83ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
stclteacher.dispose();
stafflogin.setVisible(true); }
Frame: Addteacher
private void
jButton44ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
try
{stm.executeUpdate("insert into teacher
values("+jTextField17.getText()+","+"
"+"""+jTextField18.getText()+"""+","+" "+"1"+
jTextField19.getText()+"1"+","+" "+"1"+
jTextField20.getText()+"1"+");");
JOptionPane.showMessageDialog(null,"Entry Added
Successfully");
}
catch(Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage()
); }
}
private void
jButton45ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
jTextField17.setText("");
jTextField18.setText("");
jTextField20.setText(""); }
private void
jButton46ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
addteacher.dispose();
stafflogin.setVisible(true); }
Frame:studentall
private void
jButton22ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable1.getModel();
try
{rs=stm.executeQuery("select * from student;");
int a,r,c;
String n,f,s,co;
while (rs.next()){
a=rs.getint("adm_no");
r=rs.getint("roll_no");
c=rs.getint("class");
n=rs.getString("name"); f=rs.getString("fathername");
s=rs.getString("section");
co=rs.getString("contact_no");
Object rec[]={a,r,n,f,c,s,co};
tm.addRow(rec);
rs.close(); }
catch (Exception e)
{JOptionPane.showMessageDialog(null,e.getMessage()
);
}
}
private void
jButton23ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable1.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0); }
private void
jButton24ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
studenttall.dispose();
stafflogin.setVisible(true); }
Frame: studentclass
private void
jButton25ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
private void
jButton26ActionPerformed(java.awt.event.Action
Eventevt) {// TODO add your handling code here:
private void
jButton27ActionPerformed(java.awt.event.Action
Eventevt) { // TODO add your handling code here:
stafflogin.setVisible(true);
studentclass.dispose();
jTextField12.setText("");
jTextField13.setText(""); }
Frame: studentprime
private void
jButton29ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable3.getModel(); try
Frame: addstudent
private void
jButton16ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here: try
{stm.executeUpdate("insert into student
values("+jTextField7.getText()+","+"
"+jTextField8.getText()+","+" "+"1"+
jTextField9.getText()+"1"+","+" "+"""+
jTextField10.getText()+"1"+","+" "+
jTextField4.getText()+","+" "+"""+ jTextField5.getText()
+"1"+","+" "+"+ jTextField6.getText()+"""+");");
JOptionPane.showMessageDialog(null,"Entry Added
Successfully");
}
catch(Exception e)
{ JOptionPane.showMessageDialog(null,e.getMess
age());
}
}
private void
jButton17ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
jTextField4.setText("");
jTextField5.setText("");
jTextField6.setText("");
jTextField7.setText("");
jTextField8.setText("");
jTextField9.setText("");
jTextField10.setText(""); }
private void
jButton19ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
addstudent.dispose();
stafflogin.setVisible(true);
Frame: classstrength
private void
jButton73ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable15.getModel();
try
{rs=stm.executeQuery("select * from class;");
int c,t,g,b;
String s,cl;
while (rs.next()
{ s=rs.getString("Section");
t=rs.getint("total");
cl=rs.getString("classteacher");
c=rs.getint("class");
g=rs.getint("girls");
b=rs.getint("boys");
Object rec[]={c,s,t,b,g,cl};
tm.addRow(rec); }
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMess
age());
}
}
private void
jButton74ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable15.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0); }
Frame: classparti
private void
jButton76ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable16.getModel();
Try
{rs=stm.executeQuery("select * from class where
class="+jTextField32.getText()+" "+"&&"+"
"+"section="+"""+jTextField33.getText()+"'"+";");
int c,t,g,b; String s,cl;
while (rs.next())
{ s=rs.getString("Section");
t=rs.getint("total");
cl=rs.getString("classteacher");
c=rs.getint("class");
g=rs.getint("girls");
b=rs.getint("boys");
Object rec[]={c,s,t,b,g,cl);
tm.addRow(rec);
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMess
age()); }
}
private void
jButton77ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable16.getModel();
int x= tm.getRowCount();
for(int ?=0;?<x;i++)
tm.removeRow(0);
jTextField32.setText("");
jTextField33.setText(""); }
private void
jButton78ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
classparti.dispose();
stafflogin.setVisible(true); }
private void
jButton79ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
Object rec[]={c,s,t,b,g,cl};
tm.addRow(rec);
rs.close();
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMess
age()); }
}
Frame: addclass
private void
jButton70ActionPerformed(java.awt.event.ActionEve
nt evt) { // TODO add your handling code here:
try
{stm.executeUpdate("insert into class
values("+jTextField26.getText()+","+"
"+"*"+jTextField27.getText()+"1"+","+" "+
jTextField28.getText()+","+""+jTextField29.getText()
+","+" "+ jTextField30.getText()+","+" "+"1"+
jTextField31.getText()+"1"+");");
JOptionPane.showMessageDialog(null,"Entry Added
Successfully");
catch(Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage()
);
}
private void
jButton71ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
jTextField26.setText("");
jTextField27.setText("");
jTextField28.setText("");
jTextField29.setText("");
jTextField30.setText("");
jTextField31.setText("");}
private void
jButton72ActionPerformed(java.awt.event.ActionEve
ntevt) {// TODO add your handling code here:
addclass.dispose();
stafflogin.setVisible(true);
}
Frame: sfbyname
private void
jButton56ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable11.getModel();
try
{rs=stm.executeQuery("select * from teacher where name like
"%"+jTextField23.getText()+"%'"+";");
int t;
String n,p,s;
while (rs.next()){
t=rs.getint("teacher_id");
n=rs.getString("name");
p=rs.getString("post");
s=rs.getString("subject");
Object rec[]={t,n,p,s};
tm.addRow(rec);
}
rs.close();
}
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
}
}
private void
jButton57ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable11.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
jTextField23.setText("");
private void
jButton58ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
sfbyname.dispose();
stafflogin.setVisible(true);
Frame: sfbypost
private void
jButton53ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable12.getModel();
try
{rs=stm.executeQuery("select * from teacher where
post="+"""+jTextField22.getText()+"""+";");
int t;
String n,s;
while (rs.next()){
t=rs.getint("teacher_id");
n=rs.getString("name");
s=rs.getString("subject");
Object rec[]={t,n,s};
tm.addRow(rec);
}
rs.close();}
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
}
}
private
voidjButton62ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm=(DefaultTableModel)jTable12.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
jTextField22.setText("");
}
private void
jButton63ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
sfbypost.dispose();
stafflogin.setVisible(true);
Frame: sfbysub
private void
jButton64ActionPerformed(java.awt.event.ActionEvent
evt) {
/ /TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable13.getModel();
try
{rs=stm.executeQuery("select * from teacher where
subject="+"""+jTextField24.getText()+"1"+";");
int t;
String n,p;
while (rs.next()){
t=rs.getint("teacher_id");
n=rs.getString("name");
p=rs.getString("post");
Object rec[]={t,n,p};
tm.addRow(rec); }
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
}
}
private void
jButton65ActionPerformed(java.awt.event.ActionEvent
evt) {
//TODO add your handling code here:
DefaultTableModel tm=(DefaultTableModel)
jTable13.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
jTextField24.setText(""); }
private void
jButton66ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
sfbysub.dispose();
stafflogin.setVisible(true);
}
Frame: sfbyid
private void
jButton67ActionPerformed(java.awt.event.ActionEvent evt)
{
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable14.getModel();
try {rs=stm.executeQuery("select * from teacher where
teacher_id="+jTextField25.getText()+";");
String n,p,s;
while (rs.next()){
s=rs.getString("Subject");
n=rs.getString("name");
p=rs.getString("post");
Object rec[]={n,p,s};
tm.addRow(rec); }
rs.close();
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
}
}
private void
jButton68ActionPerformed(java.awt.event.ActionEvent evt)
{
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel)
jTable14.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
jTextField25.setText("");
private void
jButton69ActionPerformed(java.awt.event.ActionEvent evt)
{
// TODO add your handling code here:
sfbyid.dispose();
stafflogin.setVisible(true); }
Frame: stbyname
private void jButton35ActionPerformed(java.awt.event.ActionEvent
evt) {
Try
int a,r,c;
String n,f,s,co;
while (rs.next()){
a=rs.getint("adm_no");
r=rs.getint("roll_no");
c=rs.getint("class");
n=rs.getString("name");
f=rs.getString("fathername");
s=rs.getString("section");
co=rs.getString("contact_no");
Object rec[]={a,r,n,f,c,s,co};
tm.addRow(rec); }
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
evt) {
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
jTextField11.setText(""'); }
evt) {
stbyname.dispose();
stafflogin.setVisible(true); }
Frame: sfbyclass
private void jButton38ActionPerformed(java.awt.event.ActionEvent
evt) {
try
int a,r,c;
String n,f,s,co;
while (rs.next()){
a=rs.getint("adm_no");
r=rs.getint("roll_no");
c=rs.getint("class");
n=rs.getString("name");
f=rs.getString("fathername");
s=rs.getString("section");
co=rs.getString("contact_no");
Object rec[]={a,r,n,f,c,s,co};
tm.addRow(rec); }
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
evt) {
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
jTextField14.setText("");
jTextField15.setText(""); }
evt) {
stbyclass.dispose();
stafflogin.setVisible(true); }
Frame: stbyadm
try
int r,c;
String n,f,s,co;
while (rs.next()){
r=rs.getint("roll_no");
c=rs.getint("class");
n=rs.getString("name");
f=rs.getString("fathername");
s=rs.getString("section");
co=rs.getString("contact_no");
Object rec[]={r,n,f,c,s,co};
tm.addRow(rec); }
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
jTextField16.setText("");
stbyadm.dispose();
stafflogin.setVisible(true);
}
Frame: studentlogin
{uniform.setVisible(true);
studentlogin.dispose();}
{feestructure.setVisible(true);
studentlogin.dispose();}
{codeofconduct.setVisible(true);
studentlogin.dispose();}
{examschedule.setVisible(true);
studentlogin.dispose();}
else if(jComboBox1.getSelectedItem() == "List of Holidays")
{listofholidays.setVisible(true);
studentlogin.dispose();
studentlogin.dispose();
loginframe.setVisible(true);
Frame: uniform
private void
jButton84ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
if(jRadioButton3.isSelected() == true &&
jRadioButton5.isSelected() == true)
{jTextArea5.setText("BOYS SUMMER UNIFORM"+'\n'+
"Classes I-V:-"+'\n'+
"Shirt- 1 wide Nehru/Madarin Collar in red colour."+'\n'+
"Half seleeves with 1 wide edging on sleeve in Red colour"+'\
n'+
"1 wide placket in red colour. Short - Two pocket in frint"+'\
n'+
"and a hip pocket 2 wide Waist band" +'\n'+
'\n'+"Classes VI-XII:-"+"\n'+
"Shirt- shirt Collar in Red colour. Half sleeves with 1
wide"+'\n'+
"edging on the sleeves in red colour. 1 wide
Placket"+"\n'+
"Trousers- Pleated with 2 waist band, 2 side pockets and"+'\
n'+
"a welt pocket at back");
}
else if(jRadioButton3.isSelected() == true &&
jRadioButton6.isSelected() == true)
{jTextArea5.setText("BOYS WINTER UNIFORM"+'\n'+
"Classes I-V:-"+'\n'+
"Shirt- 1 wide Nehru/Madae cuff on sleeve in Red colour"+'\
n'+
"1 wide placket in red colourrin Collar in red colour."+'\n'+
"full seleeves with 1 wide cuff on sleeve in Red colour"+'\n'+
"1 wide placket in red colour. trouser - pleater with 2 waist
band, "+'\n'+
"two pocket in frint and a hip pocket 2 wide Waist band" +'\
n'+
’\n'+"Classes VI-XII:-"+'n'+
"Shirt- Shirt- 1 wide Nehru/Madarin Collar in red colour."+"\
n'+
" Full sleeves with 1 wide"+'\n'+
"edging on the sleeves in red colour. 1 wide Placket"+"\n'+
"Trousers- Pleated with 2 waist band, 2 side pockets and"+'\
n'+
"a welt pocket at back");
}
else if(jRadioButton4.isSelected() == true &&
jRadioButton5.isSelected() == true)
{jTextArea5.setText("GIRLS SUMMER UNIFORM"+"\n'+
"Classes I-II:-"+'\n'+
"Tunic- one piece princes line tunic with red colour 2
wide"+"\n'+
"Peter pan collor. 1 red colour edging on sleeve
band"+'\n'+'\n'+
"Classes III-VIli:-"+'\n'+
"Shirt- 1 wide Nehru/Mandarin collar in Red
colour"+'\n'+
"1 wide placket in red colour in Collar in red
colour."+"\n'+
"full seleeves with 1 wide cuff on sleeve in Red
colour"+'\n'+
"1 wide placket in red colour. Skirt with 2 wide
waist band."+'\n'+
"1 wide edging of red colour 2 above hem line."+"\
n'+'\n'+
"Classes IX-XII:-"+'\n'+
"kurta- 1 wide nehru/mandrarin collar in red
colour. 1 edging"+"\n'+
"in red colour on sleeve band. Length options
for kurta 36 or 40. "+'\n'+
"placket- centre front opening. Sleeve- Half
Sleeve with 1 wide red"+'\n'+
"Edging at hem of sleeve. Side slit with red
facimg. Waist coat-Stitched"+"\n'+
"at side seam with kurta. Trousers- Straight cut
with waist band,"+"\n'+
"and 2 side pockets");
}
else if(jRadioButton4.isSelected() == true &&
jRadioButton6.isSelected() == true)
{jTextArea5.setText("GIRLS WINTER UNIFORM"+'\n'+
"Classes I-II:-"+"\n'+
"Shirt- 1 wide Nehru/Madaarin collor in Red
colour"+'\n'+
"1 wide placket in red colour in Collar in red
colour."+"\n'+
"Tunic- one piece princes line tunic with red colour 2
wide"+'\n'+
"Peter pan collor. pantyhouse- Grey"+'\n'+'\n'+
"Classes III-VIII:-"+'\n'+
"Shirt- 1 wide Nehru/Madae cuff on sleeve in
Redcolour"+"\n'+
"1 wide placket in red colourrin Collar in red
colour."+'\n'+
"full seleeves with 1 wide cuff on sleeve in Red
colour"+'\n'+
"1 wide placket in red colour. Skirt with 2 wide waist
band."+'\n'+
"1 wide edging of red colour 2 above hem line."+'\
n'+'\n'+
"Classes IX-XII:-"+"\n'+
"kurta- 1 wide nehru/mandrarin collar in red colour.
1 edging"+"\n'+
"in red colour on sleeve band. Length options for
kurta 36 or 40."+'\n'+
"placket- centre front opening. Sleeve- Half Sleeve
with 1 wide red"+'\n'+
"Edging at hem of sleeve. Side slit with red facimg.
Waist coat-Stitched"+'\n'+
"at side seam with kurta. Trousers- Straight cut with
waist band, "+'\n'+
"and 2 side pockets");
}
}
private void
jButton112ActionPerformed(java.awt.event.ActionEvent
evt) { // TODO add your handling code here:
jTextArea5.setText("");
if(jRadioButton3.isSelected() == true)
jRadioButton3.setSelected(false);
if(jRadioButton4.isSelected() == true)
jRadioButton4.setSelected(false);
if(jRadioButton5.isSelected() == true)
jRadioButton5.setSelected(false);
if(jRadioButton6.isSelected() == true)
jRadioButton6.setSelected(false);
}
private void
jButton86ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
uniform.dispose();
studentlogin.setVisible(true);
}
Frame: feestructure
private void
jButton87ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable18.getModel();
try
{rs=stm.executeQuery("select * from feestructure;");
int a,b,c,d,e;
String cl;
while (rs.next()){
a=rs.getint("tutionfee");
b=rs.getint("vvn");
cl=rs.getString("class");
c=rs.getint("comp");
d=rs.getint("total");
e=rs.getint("ttotal");
Object rec[]={cl,a,b,c,d,e};
tm.addRow(rec);
}
rs.close();
}
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
}
}
private void
jButton88ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable18.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
}
private void
jButton88ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable18.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0);
}
Frame: examinationschedule
private void
jButton87ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable18.getModel();
try
{rs=stm.executeQuery("select * from feestructure;");
int a,b,c,d,e;
String cl;
while (rs.next()){
a=rs.getint("tutionfee");
b=rs.getint("vvn");
cl=rs.getString("class");
c=rs.getint("comp");
d=rs.getint("total");
e=rs.getint("ttotal");
Object rec[]={cl,a,b,c,d,e};
tm.addRow(rec); }
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
}
}
private void
jButton88ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable18.getModel();
int x= tm.getRowCount();
for(int i=0;i<x;i++)
tm.removeRow(0); }
private void
jButton89ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
feestructure.dispose();
studentlogin.setVisible(true); }
Frame: codeofconduct
private void
jButton111ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
codeofconduct.dispose();
studentlogin.setVisible(true); }
Frame: listofdates
private void
jButton93ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
DefaultTableModel tm= (DefaultTableModel) jTable20.getModel();
try
{rs=stm.executeQuery("select * from list;");
String c,nm,nt,t;
while (rs.next()){
c=rs.getString("sno");
nm=rs.getString("holiday");
nt=rs.getString("date");
t=rs.getString("day");
Object rec[]={c,nm,nt,t};
tm.addRow(rec);
rs.close(); }
catch (Exception e)
{ JOptionPane.showMessageDialog(null,e.getMessage());
}
}
private void
jButton94ActionPerformed(java.awt.event.ActionEvent
evt) {
// TODO add your handling code here:
Software Requirement-
Windows 2000/XP OS is desirable.
NetBeans Ver 5.1 or higher should be installed with JDK and JVM.
MySQL Ver 6.1 with Library Database must be present at machine.
Database Installation
The software project is distributed with a backup copy of a Database
named School with required tables. Some dummy records are present in
the tables for testing purposes, which can be deleted before inserting real
data. The project is shipped with SCL.SQL file which installs a database and
tables in the computer system.
8.Bibliography
(4) http://www.mysql.org/
(5) http://www.netbeans.org/
(6) On-line Help of NetBeans ?
(7) Together with Informatics Practices
(8) Various Websites of Discussion Forum and software development
activities.