Class 12th Project on Java & MySQL Connectiviy
Class 12th Project on Java & MySQL Connectiviy
Project
On
Java and MySql Connectivity
CERTIFICATE
ACKNOWLEDGEMENT
Contents
Objectives of the project.............................
INTRODUCTION TO MySQL..........................
Screenshot of MySQL....................................
Bibliography...................................................
INTRODUCTION TO JAVA
Java is a computer programming language that is
concurrent, class-based, object-oriented And
specifically designed to have as few implementation
dependencies as possible. It is intended to let
application developers”write once, run anywhere"
(WORA),meaning that Code that runs on one platform
does not need to be recompiled to run on another. Java
applications are typically compiled to bytecode that can
run on any Java virtual
machine(JVM)regardlessof computer architecture.
Java is, as of 2015,one of the most
popular programming languages in use, particularly for
client-server web applications, with a reported 9
million developers. Java was originally developed
by James Gosling at Sun Microsystems(which has since
merged) and released in1995 as a core component of Sun
Microsystems platform. The language derives much of
its syntax from C and C++, but it has fewer Facilities
than either of them.
Features of Java
1. Simple
2. Object-Oriented
3. Platform Independent
4. Secured
5. Robust
6. Open product
7. Portable
}
});
}
// Variables declaration - do not modify
private javax.swing.JDialog AboutMe;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JButton jButton7;
private javax.swing.JButton jButton8;
private javax.swing.JButton jButton9;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel10;
private javax.swing.JLabel jLabel11;
private javax.swing.JLabel jLabel12;
private javax.swing.JLabel jLabel13;
private javax.swing.JLabel jLabel14;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
private javax.swing.JPanel jPanel1;
private javax.swing.JSeparator jSeparator1;
// End of variables declaration
}
EmpAddUI.java
import java.sql.*;
import javax.swing.JOptionPane;
public class EmpAddUI extends javax.swing.JFrame {
public EmpAddUI() {
initComponents();
}
private void cmdExitActionPerformed(java.awt.event.ActionEvent evt) {
this.setVisible(false);
new MainUI().setVisible(true);
}
}
private void cmdClearActionPerformed(java.awt.event.ActionEvent evt) {
txtNo.setText("");
txtPName.setText("");
txtCity.setText("");
txtPhone.setText("");
cmdSave.setEnabled(false);
}
// Variables declaration - do not modify
private javax.swing.ButtonGroup buttonGroup1;
private javax.swing.JButton cmdClear;
private javax.swing.JButton cmdExit;
private javax.swing.JButton cmdNew;
private javax.swing.JButton cmdSave;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JRadioButton jRadioButton1;
private javax.swing.JRadioButton jRadioButton2;
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
private javax.swing.JTextField txtCity;
private javax.swing.JTextField txtNo;
private javax.swing.JTextField txtPName;
private javax.swing.JTextField txtPhone;
// End of variables declaration
}
EmpDelUI.java
import java.sql.*;
import javax.swing.JOptionPane;
import javax.swing.DefaultListModel;
public class EmpDelUI extends javax.swing.JFrame {
public EmpDelUI() {
initComponents();
}
Statement stmt = null;
ResultSet rs = null;
String SQL = "SELECT * FROM emp";
EmpEditUI.java
import java.sql.*;
import javax.swing.JOptionPane;
import javax.swing.DefaultListModel;
EmpNavUI.java
import java.sql.*;
import javax.swing.JOptionPane;
if (rs.previous()) {
String PN = rs.getString("empid");
String PName = rs.getString("empname");
String PAdd = rs.getString("empcity");
String PPh = rs.getString("empphone");
String PSex = rs.getString("empsex");
// Displaying the contents in respective text boxes.
txtNo.setText(PN);
txtName.setText(PName);
txtAdd.setText(PAdd);
txtPh.setText(PPh);
if(PSex.equals("M"))
jRadioButton1.setSelected(true);
else
jRadioButton2.setSelected(true);
cmdFirst.setEnabled(true);
cmdNext.setEnabled(true);
cmdPrev.setEnabled(true);
cmdLast.setEnabled(true);
} else {
cmdPrev.setEnabled(false);
JOptionPane.showMessageDialog(this, "You are at first position", "Student",0);
}
} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
EmpSearchUI.java
import java.sql.*;
import javax.swing.JOptionPane;
public class EmpSearchUI extends javax.swing.JFrame {
public EmpSearchUI() {
initComponents();
}
3. www.icbse.com
4. www.wikipedia.org