SlideShare a Scribd company logo
//Next
f1obj=new f1();
obj.setVisible(true);
this.dispose();
//Signup
f3obj=new f3();
obj.setVisible(true);
this.dispose();
//Login
f2obj=new f2();
obj.setVisible(true);
this.dispose();
//Exit
System.exit(0);
//Back
f1obj=new f1();
obj.setVisible(true);
this.dispose();
//Submit
String e=tf1.getText();
String p=new String(pf1.getPassword());
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
java.sql.StatementStmt=(java.sql.Statement) con.createStatement();
String query="Select * from users where email='"+e+"' and password='"+p+"';";
ResultSetrs=Stmt.executeQuery(query);
if(rs.next())
{
f3obj=new f3();
obj.setVisible(true);
this.dispose();
}
else
JOptionPane.showMessageDialog(this,"You doesn't have a account. Pleasecreate a account");
}
catch(Exception wr)
{
JOptionPane.showMessageDialog(this,wr.getMessage());
}
//Back
f1obj=new f1();
obj.setVisible(true);
this.dispose();
//Submit
String f=tf1.getText();
String l=tf2.getText();
String e=tf3.getText();
String m=tf4.getText();
String p=new String(pf1.getPassword());
String g=null,t="User";
if (rdb1.isSelected())
g="M";
else
g="F";
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="insert into users values('"+f+"','"+l+"','"+e+"','"+m+"','"+p+"','"+g+"');";
Stmt.executeUpdate(query);
f2obj=new f2();
obj.setVisible(true);
this.dispose();
}
catch(Exception wr)
{
JOptionPane.showMessageDialog(this,wr.getMessage());
}
//Add Player
f5obj=new f5();
obj.setVisible(true);
this.dispose();
//Remove player
f6obj=new f6();
obj.setVisible(true);
this.dispose();
//Player info
f7obj=new f7();
obj.setVisible(true);
this.dispose();
//Add player moves
f8obj=new f8();
obj.setVisible(true);
this.dispose();
//Update moves
f9obj=new f9();
obj.setVisible(true);
this.dispose();
//Add new match
f10obj=new f10();
obj.setVisible(true);
this.dispose();
//Remove match
f11obj=new f11();
obj.setVisible(true);
this.dispose();
//Match info
f12obj=new f12();
obj.setVisible(true);
this.dispose();
//Add new belt
f13obj=new f13();
obj.setVisible(true);
this.dispose();
//Remove belt
f14obj=new f14();
obj.setVisible(true);
this.dispose();
//Add match type
f15obj=new f15();
obj.setVisible(true);
this.dispose();
//Remove match type
f16obj=new f16();
obj.setVisible(true);
this.dispose();
//Logout
f1obj=new f1();
obj.setVisible(true);
this.dispose();
//
int y= cb2.getSelectedIndex();
int m= cb3.getSelectedIndex();
int s=(Integer)sp1.getValue();
int d;
if(m==0)
{
if(s<=31&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(y/4==0 && m==1)
{
if(s<=29&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(y/4!=0 && m==1)
{
if(s<=29&&s>0)
d=s;
}
else if(m==2)
{
if(s<=31&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==3)
{
if(s<=30&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==4)
{
if(s<=31&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==5)
{
if(s<=30&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==6)
{
if(s<=31&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==7)
{
if(s<=31&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==8)
{
if(s<=30&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==9)
{
if(s<=31&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==10)
{
if(s<=30&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
else if(m==11)
{
if(s<=31&&s>0)
d=s;
else
JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Add player
String i=tf1.getText();
String n=tf2.getText();
String a=tf3.getText();
String y= cb2.getSelectedItem().toString();
String mo= cb3.getSelectedItem().toString();
intdit=(Integer)sp1.getValue();
String dmy=""+dit+mo+y;
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="insert into players values('"+i+"','"+n+"','"+a+"','"+dmy+"','null');";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Player successfully added");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Remove
inti=Integer.parseInt(tf1.getText());
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="delete from players where pid='"+i+"';";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Player successfully removed");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Show
DefaultTableModel m=(DefaultTableModel)t1.getModel();
int a=t1.getRowCount();
for(inti=1;i<=a;i++)
{
if(a>0)
{
m.removeRow(0);}}
try
{
Class.forName("java.sql.DriverManager");
com.mysql.jdbc.Connection
con=(com.mysql.jdbc.Connection)DriverManager.getConnection("jdbc:mysql://localhost/transport","root",
"mahadev");
com.mysql.jdbc.Statementstmt=(com.mysql.jdbc.Statement) con.createStatement();
String query="Select * from players;";
ResultSetrs=stmt.executeQuery(query);
int found=0;
while(rs.next())
{
String Pid=rs.getString("pid");
String Name=rs.getString("pname");
String Age=rs.getString("age");
String DOJ=rs.getString("DOJ");
String Moves=rs.getString("moves");
m.addRow(new Object[]{Pid, Name, Age, DOJ, Moves});found++;
}
if(found==0)
{
JOptionPane.showMessageDialog(this,"No record found");
}
}
catch (Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Add Move
String i=tf1.getText();
String n=tf2.getText();
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://loca lhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="update players setmoves='"+n+"' where pid='"+i+"';";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Move successfully added");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Remove
inti=Integer.parseInt(tf1.getText());
String m=tf2.getText();
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="update players setmoves='"+m+"' where pid='"+i+"';";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Moves successfully removed");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="Select mname from match;";
ResultSetrs=Stmt.executeQuery(query);
while(rs.next())
{
cb1.addItem(rs.getString("mname"));
}
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="Select pname from players;";
ResultSetrs=Stmt.executeQuery(query);
while(rs.next())
{
cb2.addItem(rs.getString("pname"));
}
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Add Match
String i=tf1.getText();
String r=tf2.getText();
String mn=cb1.getSelectedItem().toString();
String p1=cb2.getSelectedItem().toString();
String p2=cb3.getSelectedItem().toString();
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="insert into matchlistvalues('"+i+"','"+mn+"','"+r+"','"+p1+"','"+p2+"');";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Match successfully added");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Remove
inti=Integer.parseInt(tf1.getText());
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="delete from match where mid='"+i+"';";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Player successfully removed");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Show
DefaultTableModel m=(DefaultTableModel)t1.getModel();
int a=t1.getRowCount();
for(inti=1;i<=a;i++)
{
if(a>0)
{
m.removeRow(0);}}
try
{
Class.forName("java.sql.DriverManager");
com.mysql.jdbc.Connection
con=(com.mysql.jdbc.Connection)DriverManager.getConnection("jdbc:mysql://localhost/transport","root",
"mahadev");
com.mysql.jdbc.Statementstmt=(com.mysql.jdbc.Statement) con.createStatement();
String query="Select * from matchlist;";
ResultSetrs=stmt.executeQuery(query);
int found=0;
while(rs.next())
{
String Mid=rs.getString("mid");
String Name=rs.getString("mname");
String Rname=rs.getString("rname");
String P1=rs.getString("P1");
String P2=rs.getString("P2");
m.addRow(new Object[]{Mid, Name, Rname, P1, P2});found++;
}
if(found==0)
{
JOptionPane.showMessageDialog(this,"No record found");
}
}
catch (Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Add belt
String i=tf1.getText();
String n=tf2.getText();
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="insert into belts values('"+i+"','"+n+"');";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Beltsuccessfully added");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Remove
inti=Integer.parseInt(tf1.getText());
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="delete from belts where bid='"+i+"';";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Player successfully removed");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Add match
String i=tf1.getText();
String n=tf2.getText();
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="insert into match values('"+i+"','"+n+"');";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Match successfully added");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
//Back
f4obj=new f4();
obj.setVisible(true);
this.dispose();
//Remove
inti=Integer.parseInt(tf1.getText());
try
{
Class.forName("java.sql.DriverManager");
Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root",
"mahadev");
Statement Stmt=(Statement) con.createStatement();
String query="delete from match where mid='"+i+"';";
Stmt.executeUpdate(query);
JOptionPane.showMessageDialog(null,"Player successfully removed");
}
catch(Exception wm)
{
JOptionPane.showMessageDialog(this,wm.getMessage());
}
Wwe Management System

More Related Content

What's hot

Lập trình Python cơ bản
Lập trình Python cơ bảnLập trình Python cơ bản
Lập trình Python cơ bản
Nguyen Thi Lan Phuong
 
Towards Reusable Components With Aspects [ICSE 2008]
Towards Reusable Components With Aspects [ICSE 2008]Towards Reusable Components With Aspects [ICSE 2008]
Towards Reusable Components With Aspects [ICSE 2008]
Kevin Hoffman
 
Vaadin 7
Vaadin 7Vaadin 7
Vaadin 7
Joonas Lehtinen
 
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
재춘 노
 
Js 单元测试框架介绍
Js 单元测试框架介绍Js 单元测试框架介绍
Js 单元测试框架介绍louieuser
 
code for quiz in my sql
code for quiz  in my sql code for quiz  in my sql
code for quiz in my sql
JOYITAKUNDU1
 
The Ring programming language version 1.8 book - Part 31 of 202
The Ring programming language version 1.8 book - Part 31 of 202The Ring programming language version 1.8 book - Part 31 of 202
The Ring programming language version 1.8 book - Part 31 of 202
Mahmoud Samir Fayed
 
Property-based testing
Property-based testingProperty-based testing
Property-based testing
Dmitriy Morozov
 
This is a basic JAVA pgm that contains all of the major compoents of DB2
This is a basic JAVA pgm that contains all of the major compoents of DB2This is a basic JAVA pgm that contains all of the major compoents of DB2
This is a basic JAVA pgm that contains all of the major compoents of DB2Sheila A. Bell, MS, PMP
 
Programming Java - Lection 07 - Puzzlers - Lavrentyev Fedor
Programming Java - Lection 07 - Puzzlers - Lavrentyev FedorProgramming Java - Lection 07 - Puzzlers - Lavrentyev Fedor
Programming Java - Lection 07 - Puzzlers - Lavrentyev Fedor
Fedor Lavrentyev
 
ESNext for humans - LvivJS 16 August 2014
ESNext for humans - LvivJS 16 August 2014ESNext for humans - LvivJS 16 August 2014
ESNext for humans - LvivJS 16 August 2014
Jan Jongboom
 
Beyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCodeBeyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCode
Aijaz Ansari
 
Deferred
DeferredDeferred
Deferred
daiying-zhang
 
The Ring programming language version 1.6 book - Part 15 of 189
The Ring programming language version 1.6 book - Part 15 of 189The Ring programming language version 1.6 book - Part 15 of 189
The Ring programming language version 1.6 book - Part 15 of 189
Mahmoud Samir Fayed
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
caswenson
 
Fia fabila
Fia fabilaFia fabila
Fia fabila
fiafabila
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian
KhairunnisaPekanbaru
 
Tugas 2
Tugas 2Tugas 2
Tugas 2
Novi_Wahyuni
 
Spock framework
Spock frameworkSpock framework
Spock framework
Djair Carvalho
 

What's hot (20)

Lập trình Python cơ bản
Lập trình Python cơ bảnLập trình Python cơ bản
Lập trình Python cơ bản
 
Towards Reusable Components With Aspects [ICSE 2008]
Towards Reusable Components With Aspects [ICSE 2008]Towards Reusable Components With Aspects [ICSE 2008]
Towards Reusable Components With Aspects [ICSE 2008]
 
Vaadin 7
Vaadin 7Vaadin 7
Vaadin 7
 
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
드로이드 나이츠 2018: RxJava 적용 팁 및 트러블 슈팅
 
Js 单元测试框架介绍
Js 单元测试框架介绍Js 单元测试框架介绍
Js 单元测试框架介绍
 
code for quiz in my sql
code for quiz  in my sql code for quiz  in my sql
code for quiz in my sql
 
The Ring programming language version 1.8 book - Part 31 of 202
The Ring programming language version 1.8 book - Part 31 of 202The Ring programming language version 1.8 book - Part 31 of 202
The Ring programming language version 1.8 book - Part 31 of 202
 
Property-based testing
Property-based testingProperty-based testing
Property-based testing
 
This is a basic JAVA pgm that contains all of the major compoents of DB2
This is a basic JAVA pgm that contains all of the major compoents of DB2This is a basic JAVA pgm that contains all of the major compoents of DB2
This is a basic JAVA pgm that contains all of the major compoents of DB2
 
Programming Java - Lection 07 - Puzzlers - Lavrentyev Fedor
Programming Java - Lection 07 - Puzzlers - Lavrentyev FedorProgramming Java - Lection 07 - Puzzlers - Lavrentyev Fedor
Programming Java - Lection 07 - Puzzlers - Lavrentyev Fedor
 
ESNext for humans - LvivJS 16 August 2014
ESNext for humans - LvivJS 16 August 2014ESNext for humans - LvivJS 16 August 2014
ESNext for humans - LvivJS 16 August 2014
 
Beyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCodeBeyond Breakpoints: Advanced Debugging with XCode
Beyond Breakpoints: Advanced Debugging with XCode
 
Deferred
DeferredDeferred
Deferred
 
The Ring programming language version 1.6 book - Part 15 of 189
The Ring programming language version 1.6 book - Part 15 of 189The Ring programming language version 1.6 book - Part 15 of 189
The Ring programming language version 1.6 book - Part 15 of 189
 
Learning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security APILearning Java 4 – Swing, SQL, and Security API
Learning Java 4 – Swing, SQL, and Security API
 
Fia fabila
Fia fabilaFia fabila
Fia fabila
 
201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian201913001 khairunnisa progres_harian
201913001 khairunnisa progres_harian
 
Tugas 2
Tugas 2Tugas 2
Tugas 2
 
Ss
SsSs
Ss
 
Spock framework
Spock frameworkSpock framework
Spock framework
 

Similar to Wwe Management System

Swing database(mysql)
Swing database(mysql)Swing database(mysql)
Swing database(mysql)
vishal choudhary
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
Tomek Kaczanowski
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
Alexandre Morgaut
 
Student management system
Student management systemStudent management system
Student management system
geetika goyal
 
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Mail.ru Group
 
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
Mail.ru Group
 
Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113
SOAT
 
Library system project file
Library system project fileLibrary system project file
Library system project file
PrithwishBhattachary2
 
JavaScript - Agora nervoso
JavaScript - Agora nervosoJavaScript - Agora nervoso
JavaScript - Agora nervoso
Luis Vendrame
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good TestsTomek Kaczanowski
 
PVS-Studio in 2021 - Error Examples
PVS-Studio in 2021 - Error ExamplesPVS-Studio in 2021 - Error Examples
PVS-Studio in 2021 - Error Examples
Andrey Karpov
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
Dmitry Sheiko
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1
Zianed Hou
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 SpringKiyotaka Oku
 
3 database-jdbc(1)
3 database-jdbc(1)3 database-jdbc(1)
3 database-jdbc(1)
hameedkhan2017
 
Java assgn
Java assgnJava assgn
Java assgnaa11bb11
 
JavaExamples
JavaExamplesJavaExamples
JavaExamples
Suman Astani
 
Import java
Import javaImport java
Import java
Vinay Dixit
 
MySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsMySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of Things
Alexander Rubin
 

Similar to Wwe Management System (20)

Swing database(mysql)
Swing database(mysql)Swing database(mysql)
Swing database(mysql)
 
Batch processing Demo
Batch processing DemoBatch processing Demo
Batch processing Demo
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
 
NoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love StoryNoSQL and JavaScript: a Love Story
NoSQL and JavaScript: a Love Story
 
Student management system
Student management systemStudent management system
Student management system
 
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
Security Meetup 22 октября. «Реверс-инжиниринг в Enterprise». Алексей Секрето...
 
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
Security Meetup 22 октября. «PHP Unserialize Exploiting». Павел Топорков. Лаб...
 
Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113Conf soat tests_unitaires_Mockito_jUnit_170113
Conf soat tests_unitaires_Mockito_jUnit_170113
 
Library system project file
Library system project fileLibrary system project file
Library system project file
 
JavaScript - Agora nervoso
JavaScript - Agora nervosoJavaScript - Agora nervoso
JavaScript - Agora nervoso
 
33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests33rd Degree 2013, Bad Tests, Good Tests
33rd Degree 2013, Bad Tests, Good Tests
 
PVS-Studio in 2021 - Error Examples
PVS-Studio in 2021 - Error ExamplesPVS-Studio in 2021 - Error Examples
PVS-Studio in 2021 - Error Examples
 
TypeScript Introduction
TypeScript IntroductionTypeScript Introduction
TypeScript Introduction
 
Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1Tomcat连接池配置方法V2.1
Tomcat连接池配置方法V2.1
 
JJUG CCC 2011 Spring
JJUG CCC 2011 SpringJJUG CCC 2011 Spring
JJUG CCC 2011 Spring
 
3 database-jdbc(1)
3 database-jdbc(1)3 database-jdbc(1)
3 database-jdbc(1)
 
Java assgn
Java assgnJava assgn
Java assgn
 
JavaExamples
JavaExamplesJavaExamples
JavaExamples
 
Import java
Import javaImport java
Import java
 
MySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of ThingsMySQL flexible schema and JSON for Internet of Things
MySQL flexible schema and JSON for Internet of Things
 

Recently uploaded

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
GeoBlogs
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
GeoBlogs
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 

Recently uploaded (20)

Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Fish and Chips - have they had their chips
Fish and Chips - have they had their chipsFish and Chips - have they had their chips
Fish and Chips - have they had their chips
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 

Wwe Management System

  • 2. //Back f1obj=new f1(); obj.setVisible(true); this.dispose(); //Submit String e=tf1.getText(); String p=new String(pf1.getPassword()); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); java.sql.StatementStmt=(java.sql.Statement) con.createStatement(); String query="Select * from users where email='"+e+"' and password='"+p+"';"; ResultSetrs=Stmt.executeQuery(query); if(rs.next()) { f3obj=new f3(); obj.setVisible(true); this.dispose(); } else JOptionPane.showMessageDialog(this,"You doesn't have a account. Pleasecreate a account"); } catch(Exception wr) { JOptionPane.showMessageDialog(this,wr.getMessage());
  • 3. } //Back f1obj=new f1(); obj.setVisible(true); this.dispose(); //Submit String f=tf1.getText(); String l=tf2.getText(); String e=tf3.getText(); String m=tf4.getText(); String p=new String(pf1.getPassword()); String g=null,t="User"; if (rdb1.isSelected()) g="M"; else g="F"; try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="insert into users values('"+f+"','"+l+"','"+e+"','"+m+"','"+p+"','"+g+"');"; Stmt.executeUpdate(query); f2obj=new f2(); obj.setVisible(true);
  • 4. this.dispose(); } catch(Exception wr) { JOptionPane.showMessageDialog(this,wr.getMessage()); } //Add Player f5obj=new f5(); obj.setVisible(true); this.dispose(); //Remove player f6obj=new f6(); obj.setVisible(true); this.dispose(); //Player info f7obj=new f7(); obj.setVisible(true); this.dispose(); //Add player moves f8obj=new f8(); obj.setVisible(true); this.dispose(); //Update moves f9obj=new f9(); obj.setVisible(true); this.dispose();
  • 5. //Add new match f10obj=new f10(); obj.setVisible(true); this.dispose(); //Remove match f11obj=new f11(); obj.setVisible(true); this.dispose(); //Match info f12obj=new f12(); obj.setVisible(true); this.dispose(); //Add new belt f13obj=new f13(); obj.setVisible(true); this.dispose(); //Remove belt f14obj=new f14(); obj.setVisible(true); this.dispose(); //Add match type f15obj=new f15(); obj.setVisible(true); this.dispose(); //Remove match type f16obj=new f16(); obj.setVisible(true); this.dispose(); //Logout f1obj=new f1(); obj.setVisible(true); this.dispose();
  • 6. // int y= cb2.getSelectedIndex(); int m= cb3.getSelectedIndex(); int s=(Integer)sp1.getValue(); int d; if(m==0) { if(s<=31&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(y/4==0 && m==1) { if(s<=29&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(y/4!=0 && m==1) { if(s<=29&&s>0) d=s; } else if(m==2)
  • 7. { if(s<=31&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(m==3) { if(s<=30&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(m==4) { if(s<=31&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(m==5) { if(s<=30&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(m==6) { if(s<=31&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date");
  • 8. } else if(m==7) { if(s<=31&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(m==8) { if(s<=30&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(m==9) { if(s<=31&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(m==10) { if(s<=30&&s>0) d=s; else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } else if(m==11) { if(s<=31&&s>0) d=s;
  • 9. else JOptionPane.showMessageDialog(this,"Pleaseenter a valid date"); } //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Add player String i=tf1.getText(); String n=tf2.getText(); String a=tf3.getText(); String y= cb2.getSelectedItem().toString(); String mo= cb3.getSelectedItem().toString(); intdit=(Integer)sp1.getValue(); String dmy=""+dit+mo+y; try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="insert into players values('"+i+"','"+n+"','"+a+"','"+dmy+"','null');"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Player successfully added"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); }
  • 10. //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Remove inti=Integer.parseInt(tf1.getText()); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="delete from players where pid='"+i+"';"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Player successfully removed"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Show
  • 11. DefaultTableModel m=(DefaultTableModel)t1.getModel(); int a=t1.getRowCount(); for(inti=1;i<=a;i++) { if(a>0) { m.removeRow(0);}} try { Class.forName("java.sql.DriverManager"); com.mysql.jdbc.Connection con=(com.mysql.jdbc.Connection)DriverManager.getConnection("jdbc:mysql://localhost/transport","root", "mahadev"); com.mysql.jdbc.Statementstmt=(com.mysql.jdbc.Statement) con.createStatement(); String query="Select * from players;"; ResultSetrs=stmt.executeQuery(query); int found=0; while(rs.next()) { String Pid=rs.getString("pid"); String Name=rs.getString("pname"); String Age=rs.getString("age"); String DOJ=rs.getString("DOJ"); String Moves=rs.getString("moves"); m.addRow(new Object[]{Pid, Name, Age, DOJ, Moves});found++; } if(found==0) { JOptionPane.showMessageDialog(this,"No record found"); } } catch (Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage());
  • 12. } //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Add Move String i=tf1.getText(); String n=tf2.getText(); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://loca lhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="update players setmoves='"+n+"' where pid='"+i+"';"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Move successfully added"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } //Back f4obj=new f4();
  • 13. obj.setVisible(true); this.dispose(); //Remove inti=Integer.parseInt(tf1.getText()); String m=tf2.getText(); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="update players setmoves='"+m+"' where pid='"+i+"';"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Moves successfully removed"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } // try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement();
  • 14. String query="Select mname from match;"; ResultSetrs=Stmt.executeQuery(query); while(rs.next()) { cb1.addItem(rs.getString("mname")); } } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } // try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="Select pname from players;"; ResultSetrs=Stmt.executeQuery(query); while(rs.next()) { cb2.addItem(rs.getString("pname")); } } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } //Back f4obj=new f4(); obj.setVisible(true); this.dispose();
  • 15. //Add Match String i=tf1.getText(); String r=tf2.getText(); String mn=cb1.getSelectedItem().toString(); String p1=cb2.getSelectedItem().toString(); String p2=cb3.getSelectedItem().toString(); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="insert into matchlistvalues('"+i+"','"+mn+"','"+r+"','"+p1+"','"+p2+"');"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Match successfully added"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Remove inti=Integer.parseInt(tf1.getText()); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev");
  • 16. Statement Stmt=(Statement) con.createStatement(); String query="delete from match where mid='"+i+"';"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Player successfully removed"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Show DefaultTableModel m=(DefaultTableModel)t1.getModel(); int a=t1.getRowCount(); for(inti=1;i<=a;i++) { if(a>0) { m.removeRow(0);}} try { Class.forName("java.sql.DriverManager");
  • 17. com.mysql.jdbc.Connection con=(com.mysql.jdbc.Connection)DriverManager.getConnection("jdbc:mysql://localhost/transport","root", "mahadev"); com.mysql.jdbc.Statementstmt=(com.mysql.jdbc.Statement) con.createStatement(); String query="Select * from matchlist;"; ResultSetrs=stmt.executeQuery(query); int found=0; while(rs.next()) { String Mid=rs.getString("mid"); String Name=rs.getString("mname"); String Rname=rs.getString("rname"); String P1=rs.getString("P1"); String P2=rs.getString("P2"); m.addRow(new Object[]{Mid, Name, Rname, P1, P2});found++; } if(found==0) { JOptionPane.showMessageDialog(this,"No record found"); } } catch (Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } //Back f4obj=new f4(); obj.setVisible(true); this.dispose();
  • 18. //Add belt String i=tf1.getText(); String n=tf2.getText(); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="insert into belts values('"+i+"','"+n+"');"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Beltsuccessfully added"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Remove inti=Integer.parseInt(tf1.getText()); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement();
  • 19. String query="delete from belts where bid='"+i+"';"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Player successfully removed"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); } //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Add match String i=tf1.getText(); String n=tf2.getText(); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="insert into match values('"+i+"','"+n+"');"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Match successfully added"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage());
  • 20. } //Back f4obj=new f4(); obj.setVisible(true); this.dispose(); //Remove inti=Integer.parseInt(tf1.getText()); try { Class.forName("java.sql.DriverManager"); Connection con=(Connection)DriverManager.getConnection("jdbc:mysql://localhost/wwe", "root", "mahadev"); Statement Stmt=(Statement) con.createStatement(); String query="delete from match where mid='"+i+"';"; Stmt.executeUpdate(query); JOptionPane.showMessageDialog(null,"Player successfully removed"); } catch(Exception wm) { JOptionPane.showMessageDialog(this,wm.getMessage()); }