What is Java

 

What is Java in Tamil

 

 

Java  Libraries for the project 

http://www.mediafire.com/folder/59uzsd95pqu6z/Java_Library


Entrypage.java


/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package studentmgntsystem;

import java.awt.Label;
import javax.swing.ImageIcon;
import javax.swing.JLabel;

/**
*
* @author This pc
*/
public class EntryPage extends javax.swing.JFrame {

/**
* Creates new form EntryPage
*/ //constructor
JLabel BackGround;
ImageIcon img;
public EntryPage() {
initComponents();
img = new ImageIcon(“D:\\JavaProject\\StudentMgntSystem\\src\\studentmgntsystem\\student.jpg”);
BackGround = new JLabel(“”,img,JLabel.CENTER);
BackGround.setBounds(0,0,600,600);
add(BackGround);

}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings(“unchecked”)
// <editor-fold defaultstate=”collapsed” desc=”Generated Code”>
private void initComponents() {

Delete = new javax.swing.JButton();
Add1 = new javax.swing.JButton();
View = new javax.swing.JButton();
Search = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

Delete.setText(“Delete Student”);
Delete.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
DeleteActionPerformed(evt);
}
});

Add1.setLabel(“Add Student”);
Add1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Add1ActionPerformed(evt);
}
});

View.setText(“View Student”);
View.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
ViewActionPerformed(evt);
}
});

Search.setText(“Search Student”);
Search.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
SearchActionPerformed(evt);
}
});

jLabel1.setFont(new java.awt.Font(“Tahoma”, 0, 24)); // NOI18N
jLabel1.setText(“Welcome to Student Management System”);

jButton1.setBackground(new java.awt.Color(204, 255, 0));
jButton1.setText(“X”);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 533, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(30, 30, 30))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(99, 99, 99)
.addComponent(Search, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(163, 163, 163)
.addComponent(Delete, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(56, 56, 56)
.addComponent(View, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(21, 21, 21)
.addComponent(Add1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jButton1))
.addGap(32, 32, 32)
.addComponent(Add1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(35, 35, 35)
.addComponent(View, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(32, 32, 32)
.addComponent(Search, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 30, Short.MAX_VALUE)
.addComponent(Delete, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(27, 27, 27))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
}

private void Add1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
AddStudent add=new AddStudent();
add.setVisible(true);
}

private void ViewActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
ViewStudent add=new ViewStudent();
add.setVisible(true);
}

private void SearchActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
SearchStudent add=new SearchStudent();
add.setVisible(true);

}

private void DeleteActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
DeleteStudent delete=new DeleteStudent();
delete.setVisible(true);
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate=”collapsed” desc=” Look and feel setting code (optional) “>
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if (“Nimbus”.equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(EntryPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(EntryPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(EntryPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(EntryPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new EntryPage().setVisible(true);
}
});
}

// Variables declaration – do not modify
private javax.swing.JButton Add1;
private javax.swing.JButton Delete;
private javax.swing.JButton Search;
private javax.swing.JButton View;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
// End of variables declaration
}

 

 


 

ViewStudent.java

 

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package studentmgntsystem;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.ResultSet;
import java.sql.PreparedStatement;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import net.proteanit.sql.DbUtils;

/**
*
* @author This pc
*/
public class ViewStudent extends javax.swing.JFrame {

/**
* Creates new form ViewStudent
*/
JLabel BackGround;
ImageIcon img;
public ViewStudent() {
initComponents();
img = new ImageIcon(“D:\\JavaProject\\StudentMgntSystem\\src\\studentmgntsystem\\viewstudent.jpg”);
BackGround = new JLabel(“”,img,JLabel.CENTER);
BackGround.setBounds(0,0,800,800);
add(BackGround);
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings(“unchecked”)
// <editor-fold defaultstate=”collapsed” desc=”Generated Code”>
private void initComponents() {

jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jLabel1 = new javax.swing.JLabel();
jButton1 = new javax.swing.JButton();
Add1 = new javax.swing.JButton();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
“Title 1”, “Title 2”, “Title 3”, “Title 4”
}
));
jScrollPane1.setViewportView(jTable1);

jLabel1.setFont(new java.awt.Font(“Tahoma”, 0, 24)); // NOI18N
jLabel1.setText(“View Student Details”);

jButton1.setBackground(new java.awt.Color(204, 255, 0));
jButton1.setText(“X”);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

Add1.setText(“View Student”);
Add1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Add1ActionPerformed(evt);
}
});

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(34, 34, 34)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(Add1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 880, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(0, 0, Short.MAX_VALUE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jButton1))
.addGap(32, 32, 32)
.addComponent(Add1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(208, Short.MAX_VALUE))
);

pack();
}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
EntryPage Entry = new EntryPage();
//AddStudent add=new AddStudent();
Entry.setVisible(true);
}
PreparedStatement pst;
private void Add1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try
{
Connection conn=DriverManager.getConnection(“jdbc:mysql://localhost:3306/studentdb”,”root”,””);
String sql = “select * from student_tbl” ;
pst = conn.prepareStatement(sql);
ResultSet rs= pst.executeQuery();
jTable1.setModel(DbUtils.resultSetToTableModel(rs));

}
catch(SQLException ex)
{
System.out.println(ex.toString());
}

}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate=”collapsed” desc=” Look and feel setting code (optional) “>
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if (“Nimbus”.equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(ViewStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(ViewStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(ViewStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(ViewStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ViewStudent().setVisible(true);
}
});
}

// Variables declaration – do not modify
private javax.swing.JButton Add1;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
// End of variables declaration
}

 


 

SearchStudent.java


/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package studentmgntsystem;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.ResultSet;
import java.sql.PreparedStatement;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import net.proteanit.sql.DbUtils;

/**
*
* @author This pc
*/
public class SearchStudent extends javax.swing.JFrame {

/**
* Creates new form SearchStudent
*/
JLabel BackGround;
ImageIcon img;
public SearchStudent() {
initComponents();
img = new ImageIcon(“D:\\JavaProject\\StudentMgntSystem\\src\\studentmgntsystem\\searchstudent.jpg”);
BackGround = new JLabel(img);
BackGround.setBounds(0,0,800,800);
add(BackGround);
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings(“unchecked”)
// <editor-fold defaultstate=”collapsed” desc=”Generated Code”>
private void initComponents() {

jLabel1 = new javax.swing.JLabel();
Add1 = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jButton1 = new javax.swing.JButton();
StuName = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setFont(new java.awt.Font(“Tahoma”, 0, 24)); // NOI18N
jLabel1.setText(“Search Student Details”);

Add1.setText(“Search Student”);
Add1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Add1ActionPerformed(evt);
}
});

jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
“Title 1”, “Title 2”, “Title 3”, “Title 4”
}
));
jScrollPane1.setViewportView(jTable1);

jButton1.setBackground(new java.awt.Color(204, 255, 0));
jButton1.setText(“X”);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jLabel2.setText(“Enter the Student Name”);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(34, Short.MAX_VALUE)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 880, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(34, 34, 34)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addGap(18, 18, 18)
.addComponent(StuName, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(Add1, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jButton1))
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Add1)
.addComponent(StuName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2))
.addGap(58, 58, 58)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(139, Short.MAX_VALUE))
);

pack();
}// </editor-fold>
PreparedStatement pst=null;
private void Add1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try
{
Connection conn=DriverManager.getConnection(“jdbc:mysql://localhost:3306/studentdb”,”root”,””);
String sql = “select * from student_tbl where StudentName ='” +StuName.getText() +”‘” ;

pst = conn.prepareStatement(sql);
ResultSet rs= pst.executeQuery();
jTable1.setModel(DbUtils.resultSetToTableModel(rs));

}
catch(SQLException ex)
{
System.out.println(ex.toString());
}

}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
EntryPage Entry = new EntryPage();
//AddStudent add=new AddStudent();
Entry.setVisible(true);
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate=”collapsed” desc=” Look and feel setting code (optional) “>
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if (“Nimbus”.equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(SearchStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(SearchStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(SearchStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(SearchStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new SearchStudent().setVisible(true);
}
});
}

// Variables declaration – do not modify
private javax.swing.JButton Add1;
private javax.swing.JTextField StuName;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
// End of variables declaration
}


 

DeleteStudent.java


/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package studentmgntsystem;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.ResultSet;
import java.sql.PreparedStatement;
import javax.swing.ImageIcon;
import javax.swing.JLabel;
import net.proteanit.sql.DbUtils;
/**
*
* @author This pc
*/
public class DeleteStudent extends javax.swing.JFrame {

/**
* Creates new form DeleteStudent
*/
JLabel BackGround;
ImageIcon img;
public DeleteStudent() {
initComponents();
img = new ImageIcon(“D:\\JavaProject\\StudentMgntSystem\\src\\studentmgntsystem\\searchstudent.jpg”);
BackGround = new JLabel(img);
BackGround.setBounds(0,0,800,800);
add(BackGround);
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings(“unchecked”)
// <editor-fold defaultstate=”collapsed” desc=”Generated Code”>
private void initComponents() {

jLabel1 = new javax.swing.JLabel();
StuName = new javax.swing.JTextField();
Add1 = new javax.swing.JButton();
jButton1 = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
jTable1 = new javax.swing.JTable();
jLabel2 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jLabel1.setFont(new java.awt.Font(“Tahoma”, 0, 24)); // NOI18N
jLabel1.setText(“Delete Student Details”);

Add1.setText(“Delete Student”);
Add1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
Add1ActionPerformed(evt);
}
});

jButton1.setBackground(new java.awt.Color(204, 255, 0));
jButton1.setText(“X”);
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});

jTable1.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
{null, null, null, null},
{null, null, null, null},
{null, null, null, null},
{null, null, null, null}
},
new String [] {
“Title 1”, “Title 2”, “Title 3”, “Title 4”
}
));
jScrollPane1.setViewportView(jTable1);

jLabel2.setText(“Enter the Student Name”);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2))
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 880, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(122, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(137, 137, 137)
.addComponent(StuName, javax.swing.GroupLayout.PREFERRED_SIZE, 165, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(Add1, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 546, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap()))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addGap(85, 85, 85)
.addComponent(jLabel2)
.addGap(39, 39, 39)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 178, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(160, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(22, 22, 22)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel1)
.addComponent(jButton1))
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(Add1)
.addComponent(StuName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(370, Short.MAX_VALUE)))
);

pack();
}// </editor-fold>
PreparedStatement pst=null;
PreparedStatement pst1=null;
private void Add1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
try
{
///delete query
Connection conn=DriverManager.getConnection(“jdbc:mysql://localhost:3306/studentdb”,”root”,””);
String sql = “delete from student_tbl where StudentName ='” +StuName.getText() +”‘” ;

pst = conn.prepareStatement(sql);
int i = pst.executeUpdate();

/// after deletion fetch the data and show it in the grid….
String sql1 = “select * from student_tbl” ;

pst1 = conn.prepareStatement(sql1);
ResultSet rs1= pst1.executeQuery();
jTable1.setModel(DbUtils.resultSetToTableModel(rs1));

}
catch(SQLException ex)
{
System.out.println(ex.toString());
}
}

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
// TODO add your handling code here:
dispose();
EntryPage Entry = new EntryPage();
//AddStudent add=new AddStudent();
Entry.setVisible(true);
}

/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate=”collapsed” desc=” Look and feel setting code (optional) “>
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if (“Nimbus”.equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(DeleteStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(DeleteStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(DeleteStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(DeleteStudent.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>

/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new DeleteStudent().setVisible(true);
}
});
}

// Variables declaration – do not modify
private javax.swing.JButton Add1;
private javax.swing.JTextField StuName;
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
// End of variables declaration
}

 



KaaShiv InfoTech Internship in Chennai Average rating: 5, based on 99991 reviews
Internship For CSE Students In Chennai | Internship For IT Students In Chennai | Internship For ECE Students In Chennai | Internship For EEE Students In Chennai | Internship For EIE Students In Chennai | Internship For Mechanical Engineering Students In Chennai | Internship For Civil Students In Chennai | Internship For Biotech Students In Chennai | Internship For BBA Students In Chennai | Internship For MBA Students In Chennai | Internship For MBA HR Students In Chennai | Internship For BSC Students In Chennai | Internship For MSC Students In Chennai | Internship For BCA Students In Chennai | Internship For MCA Students In Chennai | Internship For B.Com Students In Chennai | Internship For M.Com Students In Chennai | python training in chennai | web designing in chennai | dotnet training in chennai | java training in chennai | php training in chennai | networking training in chennai | android training in chennai | bigdata training in chennai | cloud computing training in chennai | ethical hacking training in chennai | blockchain training in chennai | robotics training in chennai | oracle training in chennai | c training in chennai | R programming training in chennai | ccna training in chennai | artificial intelligence training in chennai | machine learning training in chennai | sql server training in chennai | iot training in chennai | data science training in chennai | selenium testing training in chennai | c++ testing training in chennai | linux training in chennai | embedded training in chennai | mean stack training in chennai | mern stack training in chennai | mongodb training in chennai | data analytics course in chennai | react js training in chennai | angular js training in chennai | data analysis course in chennai | nodejs training in chennai | cyber security course in chennai | computer application course in chennai | digital marketing course in chennai | information science course in chennai | penetration testing course in chennai | software testing course in chennai | virtual reality course in chennai | content writing course in chennai | full stack developer course in chennai | internship for cse students | internship for it students | internship for ece students | internship for eee students | internship for mechanical engineering students | internship for aeronautical engineering students | internship for civil engineering students | internship for bcom students | internship for bcom students | internship for bca students | internship for mca students | internship for biotechnology students | internship for biomedical engineering students | internship for bsc students | internship for msc students | internship for bba students | internship for mba students | online internship for cse students | online internship for ece students | online internship for eee students | online internship for it students | online internship for mechanical engineering students | online internship for aeronautical engineering students | online internship for civil engineering students | online internship for bcom students | online internship for mcom students | online internship for bca students | online internship for mca students | online internship for biotech students | online internship for biomedical students | online internship for bsc students | online internship for msc students | online internship for bba students | online internship for mba students | internship in chennai for CSE students | internship in chennai for IT students | internship in chennai for ECE students | internship in chennai for EEE students | internship in chennai for EIE students | internship in chennai for MECH students | internship in chennai for CIVIL students | internship in chennai for BIOTECH students | internship in chennai for AERO students | internship in chennai for BBA students | internship in chennai for MBA students | internship in chennai for MBA HR students | internship in chennai for B.Sc students | internship in chennai for M.Sc students | internship in chennai for BCA students | internship in chennai for MCA students | internship in chennai for B.Com students | internship in chennai for M.Com students | Data Science Internship in Chennai | Artificial Intelligence Internship in Chennai | Web Development Internship in Chennai | Android Internship in Chennai | Cloud Computing Internship in Chennai | .Net Internship in Chennai | JAVA Internship in Chennai | Ethical Hacking Internship in Chennai | IOT Internship in Chennai | Machine Learning Internship in Chennai | Networking Internship in Chennai | Robotics Internship in Chennai | Matlab Internship in Chennai | interning meaning in tamil | internship meaning tamil | internship meaning in tamil | internship for be ece students | internship feedback | internship for cse 3rd year students | internship for 3rd year cse students | internship completion letter word format | intern experience letter | experience letter for internship | internship experience letter | feedback for internship | inplant training certificate | ethical hacking internship | internship for 1st year engineering students | online internships for bba students | project topics for m.sc computer science | online internship for bca students | internship for ece students in core companies | robotics courses chennai | robotic classes in chennai | msc cs project topics | implantation training | company internship letter format | internship experience letter template | information technology final year projects | internship letter format from company to students | inplant training in chennai for mechanical | inplant training in chennai for mechanical students | intern meaning in tamil | internship tamil meaning | interns meaning in tamil | characteristics software | python programming internship | internship letter of completion | ece student internship | characteristics of artificial intelligence systems | internship for ece students | online internship for engineering students | web designing course in chennai | aeronautics internship | cse domains | online internships for btech students | internship in aeronautical engineering | online internship for bba students | internship for bcom students in chennai | internship for b.com students in chennai | internship for aeronautical engineering | domains for cse | robotics courses in chennai | cse project domains | online internship for b.com students | project domain for computer science | robotics classes chennai | domains for cse projects | internship for first year engineering students | inplant training meaning in tamil | internships for aeronautical engineering students | internship for b com students in chennai | online internship for engineering students with certificate | robotics classes in chennai | inplant training means | inplant training meaning | online internship for btech students | web designing course in chennai fees | software characteristics in software engineering | online internship with certificates | characteristics of artificial intelligence | characteristics of ai | internship ece students | internship ece | internship for electronics and communication engineering students | ece internship | aircraft engineering internship | web design courses in chennai | internship for eee engineering students | internship completion letter sample | online internship for computer science students | web designing course chennai tamil nadu | online internships for cs students | web design course in chennai | stipend internship for cse students | msc project topics in computer science | networking course in chennai | web designing course chennai | web design course chennai | online internships for engineering students | network courses in chennai | engineering internships for first year students | online internship for mba students | php training institute in chennai | internship letter format from company | characteristics of software in software engineering | ai characteristics | internships on python | artificial intelligence characteristics | internship in cloud computing | letter of completion internship | bca internship | internships ece | internship for bca students | company internship letter | internships for bca students | domains for projects | mini project titles for mca | mini project for mca | internship for computer science students in bangalore | internship in bangalore for computer science students | mca mini project titles | internship for eee students | project ideas for msc computer science | networking courses chennai | mba final year project | mca mini project | internship for electrical and electronics engineering students | internship letter sample from company | networking course chennai | python internship for freshers | bba interview questions | internships for cse students in bangalore | hacking classes in chennai | internship completion letter template | main features of oops | internship for cs students in bangalore | internship for 2nd year cse students | application of oops in java | inplant training | oop application | mini computer science projects | online internship for it students | internship on python | python programming internships | letter of completion of internship | artificial intelligence internship | python internship work from home | web development internship certificate | mini project mca | geoinformatics internship | mini project topics in mca | domain for project | internship for ece students in government sector | applications of oops in java | mini project for mca topics | iot internship | internships for biomedical engineering | iot intern | mca mini project ideas | mini project ideas for mca | data science internship in chennai | abstract for mini projects | internship completion letter format | biotech internships for undergraduates | internship for bsc biotechnology students | web development courses in chennai | mini project topics for cse 2nd year | full stack developer course fees in chennai | web development courses chennai | python full stack developer course in chennai | mini project topics for cse 3rd year | what are characteristics of software | mini project for computer engineering | government internship for civil engineering students | hacking course chennai | top service based company in india | certification internship | software characteristics | oop features | oops applications | internship bsnl | features of oop | characteristic of software | characteristics of software | internship for python | cse mini project ideas | characteristics of software engineering | software engineering characteristics | internship completion letter | mini projects ideas for cse students | application of oops | ethical hacking course in chennai | internship in sql | civil engineer internship certificate | civil engineering internship certificate | internship for aerospace engineering | ccna networking course in chennai | internship for bca student | internship for civil engineering student | mba internship chennai | characteristics of software process | mini project topics for mca | mini projects for mca | projects domain | unix architecture explanation | biomedical engineer intern | what are the features of oops | full stack developer internship in chennai | internship in php | biomedical engineering internships | applications of oop in java | internship for aerospace engineering students | internships for mca students | what are the features of oop | biomedical engineer internship | aws cloud virtual internship | bba hr project topics | bba project topics in hr | architecture of unix with diagram | what is software characteristics | internship letter from company | inplant training for it | examples of service based companies | inplant training in chennai for cse students | python internships | python internship | mechanical internships | cloud internship | electrical internships | mini project computer science | features of oops | mini projects for cse | mini project cse | mini projects topics for cse | cse mini projects ideas | online internship with certificate | characteristic of software engineering | mini project for cse topics | mini projects cse | characteristics of software engineer | internship in python | internship of mechanical engineering | internship certificate format in word | mini projects for cse students topics | application of object oriented programming | applications of object oriented programming | project for mba | oracle training in chennai chennai tamil nadu | internship certificate word format | mechanical engineering students internship | sql internship | b ed internship certificate | training internship certificate | intern feedback | aero internships | chennai internship companies | features of software | mini projects for computer science students | bca interview questions | online internship for computer engineering students | domains in cse | government internship for electrical engineering students | net framework architecture with diagram | service based it companies | internship acceptance letter by company | internship for 1st year students | internship first year | sql courses in chennai | internship on networking | internship in computer networking | hr project topics for bba | best internships for cse students | explain net framework architecture with diagram | cloud computing in chennai | explain the architecture of unix operating system | explain architecture of unix operating system | cloud computing course in chennai | ethical hacking course chennai | web developer course in chennai | cloud courses in chennai | internship python | mechanical internship | bhel internship | oops application | mini project in computer science | mini project for cse | cse student internship | cse students internship | architecture of unix operating system | mini projects in computer science | cse mini project | unix operating system architecture | mini project topics in cse | mini project topics for cse | topics for mini project for cse | full stack developer course in chennai | internship for b.com students | characteristics of artificial intelligence problems | internship for bba students | mini project ideas for cse students | ccna certification in chennai | internship for mechanical engineering student | internship for mechanical engineering students | ccna certification chennai | mini project for computer science students | object oriented applications | internship in chennai with stipend | internship html css | internship certificate civil engineering | ideas for cse mini projects | full stack developer course fee in chennai | python developer internship | paid internships for cse students | paid internship for btech students | internships for bsc students | acceptance letter internship | major project for mca final year | service based company examples | electrical engineering student internships | unix kernel architecture diagram | cloud computing courses chennai | example of service based company | computer engineering mini projects | cloud computing certification in chennai | computer engineering mini project | service based companies examples | applications of oops | project for information technology | internship in cybersecurity | minor project topics for cse | internship permission letter | data science internship work from home | explain.net framework architecture | interview question for bca | internship online for students | cloud computing chennai | project for mca final year | b sc computer science project topics | mini project for cse students | mini projects for cse students | sql course in chennai | top service based companies in india | explain net framework architecture | architecture unix | aws internships | mba projects | aws internship | bba internship | internships for computer science undergraduates | mini projects ideas for cse | mini project ideas for computer science | mini cse projects | cse mini projects | cse mini project titles | mini project ideas for cse | internship for java | ccna classes in chennai | acceptance letter of internship | hacking course near me | internship for civil engineering students | internship on java | internship artificial intelligence | internship in embedded systems | internship bba students | internship in bhel | aws cloud internships | matlab internship | characteristics of good software design | unix os architecture diagram | certified ethical hacking course in chennai | oracle internship in india | domains in computer science engineering | project domain | placement meaning in tamil | electronics internship | ccna course chennai | request letter for internship training | oracle training in chennai | full stack course in chennai | major projects for mca final year | student request letter for internship training | sql classes in chennai | networking internships | object oriented programming application | oracle training chennai | php internships | aws cloud internship | service industry companies in india | bba final year project topics list | best internship for computer science students | full stack development course in chennai |
× How can I help you?