0% found this document useful (0 votes)
57 views

Codings

This Java code defines a login form class with fields and buttons for a user to enter their username and password. It also includes code to connect to a database and query user credentials on login button click to validate the user.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Codings

This Java code defines a login form class with fields and buttons for a user to enter their username and password. It also includes code to connect to a database and query user credentials on login button click to validate the user.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 161

Login

package school.project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import javax.swing.DefaultListModel;

import static school.project.User_database_info.Database;

import static school.project.User_database_info.listvalue;

import static school.project.User_database_info.user;

/**

* @author Yogesh Kumar Sahoo

*/

public class Login extends javax.swing.JFrame {

/**

* Creates new form Record_Manager

*/

public Login() {

initComponents();

/**

* 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() {

sp2 = new javax.swing.JScrollPane();

jPanel1 = new javax.swing.JPanel();

jLabel1 = new javax.swing.JLabel();

tf1 = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jButton2 = new javax.swing.JButton();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

tf2 = new javax.swing.JPasswordField();

jButton4 = new javax.swing.JButton();


jLabel5 = new javax.swing.JLabel();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

formWindowOpened(evt);

});

jPanel1.setBackground(new java.awt.Color(153, 102, 255));

jLabel1.setFont(new java.awt.Font("Trebuchet MS", 1, 36)); // NOI18N

jLabel1.setText("Please Verify Your Identity");

tf1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

tf1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf1ActionPerformed(evt);

});

jButton1.setText("Sign in");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

jButton2.setText("Create new");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/3.jpg"))); // NOI18N

jLabel3.setFont(new java.awt.Font("Sylfaen", 3, 18)); // NOI18N

jLabel3.setText("User ID:");

jLabel4.setFont(new java.awt.Font("Sylfaen", 3, 18)); // NOI18N

jLabel4.setText("Password:");

tf2.setNextFocusableComponent(tf2);
jButton4.setText("Exit");

jButton4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton4ActionPerformed(evt);

});

jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(449, 449, 449)

.addComponent(jLabel5))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(420, 420, 420)

.addComponent(jLabel1))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(456, 456, 456)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(56, 56, 56)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(99, 99, 99)

.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(260, 260, 260)

.addComponent(jLabel2)

.addGap(58, 58, 58)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel4)

.addComponent(jLabel3))

.addGap(42, 42, 42)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addContainerGap(1322, Short.MAX_VALUE))
);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel5)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 68, Short.MAX_VALUE)

.addComponent(jLabel1)

.addGap(106, 106, 106)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(20, 20, 20)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel3)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(30, 30, 30)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel4)))

.addComponent(jLabel2))

.addGap(69, 69, 69)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(28, 28, 28)

.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(3034, Short.MAX_VALUE))

);

sp2.setViewportView(jPanel1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(sp2, javax.swing.GroupLayout.DEFAULT_SIZE, 1200, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(sp2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 736, Short.MAX_VALUE)

);

pack();

setLocationRelativeTo(null);
}// </editor-fold>

private void tf1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void formWindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Create().setVisible(true);

this.setVisible(false);

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement stmt=conn.createStatement();

String query;

String un=tf1.getText();

String p=tf2.getText();

query="Select * from Login where User_ID='" + un + "' and password='" + p + "';";

ResultSet rs=stmt.executeQuery(query);

if(rs.next()){

JOptionPane.showMessageDialog(null, "Welcome!");

new Users().setVisible(true);

this.setVisible(false);

else

JOptionPane.showMessageDialog(null, "Invalid Username or password");

rs.close();

stmt.close();

conn.close();

user=un;

catch(Exception e)
{

JOptionPane.showMessageDialog(null,e);

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

System.exit(0);

/**

* @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(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Login.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

//</editor-fold>

//</editor-fold>

//</editor-fold>

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {


new Login().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton4;

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.JPanel jPanel1;

private javax.swing.JScrollPane sp2;

private javax.swing.JTextField tf1;

private javax.swing.JPasswordField tf2;

// End of variables declaration

Create

/*

* 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 school.project;

import java.sql.*;

import javax.swing.JOptionPane;

/**

* @author Yogesh Kumar Sahoo

*/

public class Create extends javax.swing.JFrame {

/**

* Creates new form Create

*/

public Create() {

initComponents();
}

/**

* 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() {

sp2 = new javax.swing.JScrollPane();

jPanel1 = new javax.swing.JPanel();

jLabel1 = new javax.swing.JLabel();

tf1 = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

tf2 = new javax.swing.JPasswordField();

jLabel5 = new javax.swing.JLabel();

tf3 = new javax.swing.JPasswordField();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jPanel1.setBackground(new java.awt.Color(153, 102, 255));

jLabel1.setFont(new java.awt.Font("Trebuchet MS", 1, 36)); // NOI18N

jLabel1.setText(" New User ID");

tf1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N

tf1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf1ActionPerformed(evt);

});

jButton1.setText("Submit");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/6.png"))); // NOI18N

jLabel3.setFont(new java.awt.Font("Sylfaen", 3, 18)); // NOI18N

jLabel3.setText("User ID:");

jLabel4.setFont(new java.awt.Font("Sylfaen", 3, 18)); // NOI18N

jLabel4.setText("Password:");

jLabel5.setFont(new java.awt.Font("Sylfaen", 3, 18)); // NOI18N

jLabel5.setText("Conform Password:");

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(358, 358, 358)

.addComponent(jLabel1)

.addGap(0, 0, Short.MAX_VALUE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jLabel2)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(135, 135, 135)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel4)

.addComponent(jLabel3))

.addGap(50, 50, 50)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(382, Short.MAX_VALUE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 339, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(56, 56, 56)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 151, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5))

.addGap(48, 48, 48)

.addComponent(tf3, javax.swing.GroupLayout.PREFERRED_SIZE, 335, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE))))
);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(26, 26, 26)

.addComponent(jLabel1)

.addGap(86, 86, 86)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel3)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(74, 74, 74))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel4)))

.addGap(26, 26, 26)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(tf3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5)))

.addComponent(jLabel2))

.addGap(86, 86, 86)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 257, Short.MAX_VALUE))

);

sp2.setViewportView(jPanel1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(sp2, javax.swing.GroupLayout.DEFAULT_SIZE, 1402, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(sp2, javax.swing.GroupLayout.DEFAULT_SIZE, 736, Short.MAX_VALUE)

);

pack();

setLocationRelativeTo(null);

}// </editor-fold>
private void tf1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

String a=tf2.getText();

String b=tf3.getText();

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement stmt=conn.createStatement();

String query = null;

String un=tf1.getText();

String p = null;

if(a.equals(b))

p=tf2.getText();

else

{ JOptionPane.showMessageDialog(rootPane,"Password miss matched!! Please re-enter your password");

tf2.setText("");

tf3.setText("");

query="Insert into login values('"+un+"','"+p+"');";

stmt.executeUpdate(query);

stmt.close();

conn.close();

new Login().setVisible(true);

this.setVisible(false);

catch(Exception e)

JOptionPane.showMessageDialog(null,e);

/**

* @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(Create.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Create.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Create.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Create.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 Create().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

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.JPanel jPanel1;

private javax.swing.JScrollPane sp2;

private javax.swing.JTextField tf1;

private javax.swing.JPasswordField tf2;


private javax.swing.JPasswordField tf3;

// End of variables declaration

Users

/*

* 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 school.project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import static school.project.User_database_info.AccNo;

import javax.swing.DefaultListModel;

import static school.project.User_database_info.listvalue;

import static school.project.User_database_info.Database;

/**

* @author admin

*/

public class Users extends javax.swing.JFrame {

/**

* Creates new form User_info

*/

public Users() {

initComponents();

/**

* 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() {

jDialog1 = new javax.swing.JDialog();

jPanel2 = new javax.swing.JPanel();

jPanel6 = new javax.swing.JPanel();

jScrollPane4 = new javax.swing.JScrollPane();

l2 = new javax.swing.JList<>();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jButton5 = new javax.swing.JButton();

jLabel8 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

jLabel1 = new javax.swing.JLabel();

acc = new javax.swing.JTextField();

name = new javax.swing.JTextField();

crbal = new javax.swing.JTextField();

at = new javax.swing.JTextField();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jButton2 = new javax.swing.JButton();

jLabel9 = new javax.swing.JLabel();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuItem8 = new javax.swing.JMenuItem();

jSeparator2 = new javax.swing.JPopupMenu.Separator();

jMenuItem9 = new javax.swing.JMenuItem();

jMenu2 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

jMenuItem6 = new javax.swing.JMenuItem();

jMenuItem7 = new javax.swing.JMenuItem();

jDialog1.addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

jDialog1WindowOpened(evt);
}

});

jPanel2.setBackground(new java.awt.Color(204, 0, 102));

jPanel6.setBackground(new java.awt.Color(0, 153, 204));

l2.setFont(new java.awt.Font("Arial", 3, 18)); // NOI18N

l2.setModel(new DefaultListModel());

l2.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

l2MouseClicked(evt);

public void mouseEntered(java.awt.event.MouseEvent evt) {

l2MouseEntered(evt);

});

jScrollPane4.setViewportView(l2);

jLabel6.setFont(new java.awt.Font("Times New Roman", 2, 12)); // NOI18N

jLabel6.setForeground(new java.awt.Color(255, 255, 255));

jLabel6.setText("Select one of the tables");

jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

jPanel6.setLayout(jPanel6Layout);

jPanel6Layout.setHorizontalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jLabel7))

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(40, 40, 40)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE)))

.addContainerGap())

.addGroup(jPanel6Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);
jPanel6Layout.setVerticalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addComponent(jLabel7)

.addGap(29, 29, 29)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jLabel6)

.addContainerGap(59, Short.MAX_VALUE))

);

jButton5.setBackground(new java.awt.Color(0, 102, 255));

jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton5.setForeground(new java.awt.Color(255, 255, 255));

jButton5.setText("Show Records");

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

});

jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Annotation 2019-05-21 091950.png"))); // NOI18N

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5))

.addGap(138, 138, 138))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 22, Short.MAX_VALUE))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(236, 236, 236)

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)


.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jPanel1.setBackground(new java.awt.Color(255, 153, 51));

jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/4.jpg"))); // NOI18N

at.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

atActionPerformed(evt);

});

jLabel2.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel2.setText("Account No.");

jLabel3.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel3.setText("Name");

jLabel4.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel4.setText("Current Balance");

jLabel5.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel5.setText("Account Type");

jButton1.setText("Search");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

}
});

jButton2.setText("Proceed");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(397, 397, 397)

.addComponent(jLabel9))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(238, 238, 238)

.addComponent(jLabel1)

.addGap(102, 102, 102)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jLabel2)

.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(acc)

.addComponent(name)

.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(crbal)

.addComponent(at, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jButton1)

.addGap(132, 132, 132)

.addComponent(jButton2)))))

.addContainerGap(368, Short.MAX_VALUE))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(23, 23, 23)


.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(57, 57, 57)

.addComponent(jLabel2)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(acc, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel3)

.addGap(5, 5, 5)

.addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(crbal, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(17, 17, 17)

.addComponent(jLabel5)

.addGap(18, 18, 18))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addComponent(jLabel1)

.addGap(54, 54, 54)))

.addComponent(at, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(32, 32, 32)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jButton1)

.addComponent(jButton2))

.addContainerGap(117, Short.MAX_VALUE))

);

jMenu1.setText("Actions");

jMenu1.add(jSeparator1);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem4.setText("New account");

jMenu1.add(jMenuItem4);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem3.setText("Update user data");

jMenu1.add(jMenuItem3);

jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem8.setText("Search full details");

jMenuItem8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


jMenuItem8ActionPerformed(evt);

});

jMenu1.add(jMenuItem8);

jMenu1.add(jSeparator2);

jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem9.setText("show all data");

jMenuItem9.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem9ActionPerformed(evt);

});

jMenu1.add(jMenuItem9);

jMenuBar1.add(jMenu1);

jMenu2.setText("Window");

jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem1.setText("Log Out");

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu2.add(jMenuItem1);

jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Home");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu2.add(jMenuItem2);

jMenuBar1.add(jMenu2);

jMenu3.setText("About");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem6.setText("How to use");

jMenu3.add(jMenuItem6);
jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem7.setText("Exit");

jMenu3.add(jMenuItem7);

jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

pack();

setLocationRelativeTo(null);

}// </editor-fold>

private void atActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

AccNo=acc.getText();

new Home().setVisible(true);

this.setVisible(false);

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

Object a,b = null,c = null,e = null,d = null;

a=acc.getText();

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");
Statement st=con.createStatement();

String query;

query="Select * from users where Account_No="+a+";";

ResultSet rs=st.executeQuery(query);

while(rs.next())

{ b=rs.getString(2);

c=rs.getFloat(12);

d=rs.getString(13);

e=rs.getString(3);

name.setText(b+"");

crbal.setText(c+"");

at.setText(d+"");

catch(Exception z){

JOptionPane.showMessageDialog(rootPane, z);

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jDialog1.setVisible(true);

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Login().setVisible(true);

this.setVisible(false);

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void l2MouseClicked(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

String a=l2.getSelectedValue();

listvalue=a;
}

private void l2MouseEntered(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(l2.isSelectedIndex(1))

{ new tuser().setVisible(true);

this.setVisible(false);

jDialog1.dispose();

else if(l2.isSelectedIndex(0))

{new transaction().setVisible(true);

this.setVisible(false);

jDialog1.dispose();}

else JOptionPane.showMessageDialog(rootPane,"Please select one of the table.");

private void jDialog1WindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

DefaultListModel dlm2= (DefaultListModel) l2.getModel();

Object a;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="show tables;";

stmt.executeUpdate(query);

ResultSet rs=stmt.executeQuery(query);

dlm2.removeAllElements();

rs.absolute(2);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

rs.absolute(3);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

stmt.close();
}

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

/**

* @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(Users.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Users.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Users.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Users.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

//</editor-fold>

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new Users().setVisible(true);

});

}
// Variables declaration - do not modify

private javax.swing.JTextField acc;

private javax.swing.JTextField at;

private javax.swing.JTextField crbal;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton5;

private javax.swing.JDialog jDialog1;

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.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem6;

private javax.swing.JMenuItem jMenuItem7;

private javax.swing.JMenuItem jMenuItem8;

private javax.swing.JMenuItem jMenuItem9;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel6;

private javax.swing.JScrollPane jScrollPane4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JPopupMenu.Separator jSeparator2;

private javax.swing.JList<String> l2;

private javax.swing.JTextField name;

// End of variables declaration

Home
/*

* 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 school.project;

import javax.swing.JOptionPane;

import javax.swing.table.DefaultTableModel;

import static school.project.User_database_info.Database;

import static school.project.User_database_info.listvalue;

import static school.project.User_database_info.user;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import javax.swing.DefaultListModel;

/**

* @author Yogesh Kumar Sahoo

*/

public class Home extends javax.swing.JFrame {

/**

* Creates new form Home

*/

public Home() {

initComponents();

/**

* 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() {

jDialog1 = new javax.swing.JDialog();

jPanel1 = new javax.swing.JPanel();

jPanel6 = new javax.swing.JPanel();


jScrollPane4 = new javax.swing.JScrollPane();

l2 = new javax.swing.JList<>();

jLabel6 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jButton5 = new javax.swing.JButton();

jLabel8 = new javax.swing.JLabel();

jMenuItem5 = new javax.swing.JMenuItem();

sp1 = new javax.swing.JScrollPane();

jPanel5 = new javax.swing.JPanel();

jButton4 = new javax.swing.JButton();

jButton6 = new javax.swing.JButton();

jButton7 = new javax.swing.JButton();

jLabel9 = new javax.swing.JLabel();

jLabel10 = new javax.swing.JLabel();

jLabel11 = new javax.swing.JLabel();

jLabel16 = new javax.swing.JLabel();

jButton9 = new javax.swing.JButton();

jLabel19 = new javax.swing.JLabel();

jButton10 = new javax.swing.JButton();

jLabel20 = new javax.swing.JLabel();

jButton11 = new javax.swing.JButton();

jLabel1 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jLabel2 = new javax.swing.JLabel();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuItem8 = new javax.swing.JMenuItem();

jSeparator2 = new javax.swing.JPopupMenu.Separator();

jMenuItem9 = new javax.swing.JMenuItem();

jMenu2 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

jMenuItem6 = new javax.swing.JMenuItem();

jMenuItem7 = new javax.swing.JMenuItem();

jDialog1.addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

jDialog1WindowOpened(evt);

}
});

jPanel1.setBackground(new java.awt.Color(204, 0, 102));

jPanel6.setBackground(new java.awt.Color(0, 153, 204));

l2.setFont(new java.awt.Font("Arial", 3, 18)); // NOI18N

l2.setModel(new DefaultListModel());

l2.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

l2MouseClicked(evt);

public void mouseEntered(java.awt.event.MouseEvent evt) {

l2MouseEntered(evt);

});

jScrollPane4.setViewportView(l2);

jLabel6.setFont(new java.awt.Font("Times New Roman", 2, 12)); // NOI18N

jLabel6.setForeground(new java.awt.Color(255, 255, 255));

jLabel6.setText("Select one of the tables");

jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

jPanel6.setLayout(jPanel6Layout);

jPanel6Layout.setHorizontalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jLabel5))

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(40, 40, 40)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE)))

.addContainerGap())

.addGroup(jPanel6Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel6Layout.setVerticalGroup(
jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addComponent(jLabel5)

.addGap(29, 29, 29)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jLabel6)

.addContainerGap(59, Short.MAX_VALUE))

);

jButton5.setBackground(new java.awt.Color(0, 102, 255));

jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton5.setForeground(new java.awt.Color(255, 255, 255));

jButton5.setText("Show Records");

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

});

jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Annotation 2019-05-21 091950.png"))); // NOI18N

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5))

.addGap(138, 138, 138))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 22, Short.MAX_VALUE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(236, 236, 236)

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)


.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jMenuItem5.setText("jMenuItem5");

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

formWindowOpened(evt);

});

jPanel5.setBackground(java.awt.SystemColor.textHighlight);

jPanel5.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {

public void mouseDragged(java.awt.event.MouseEvent evt) {

jPanel5MouseDragged(evt);

public void mouseMoved(java.awt.event.MouseEvent evt) {

jPanel5MouseMoved(evt);

});

jPanel5.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseEntered(java.awt.event.MouseEvent evt) {

jPanel5MouseEntered(evt);

});

jButton4.setBackground(new java.awt.Color(153, 153, 255));

jButton4.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton4.setForeground(new java.awt.Color(255, 255, 255));

jButton4.setText("Update Record");

jButton4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


jButton4ActionPerformed(evt);

});

jButton6.setBackground(new java.awt.Color(153, 153, 255));

jButton6.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton6.setForeground(new java.awt.Color(255, 255, 255));

jButton6.setText("Search full detail");

jButton6.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton6ActionPerformed(evt);

});

jButton7.setBackground(new java.awt.Color(153, 153, 255));

jButton7.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton7.setForeground(new java.awt.Color(255, 255, 255));

jButton7.setText("Add new Account");

jButton7.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton7ActionPerformed(evt);

});

jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Screenshot_2019-05-21-09-36-21-146.jpeg"))); // NOI18N

jLabel10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Screenshot_2019-05-21-09-40-32-921.jpeg"))); // NOI18N

jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Screenshot_2019-05-21-09-44-25-476.jpeg"))); // NOI18N

jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/{8A098B7A-4AD9-4F0B-8F55-6F972EEF9733}.png.jpg"))); // NOI18N

jButton9.setBackground(new java.awt.Color(153, 153, 255));

jButton9.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton9.setForeground(new java.awt.Color(255, 255, 255));

jButton9.setText("Debit");

jButton9.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton9ActionPerformed(evt);

});

jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/{0F4B4670-2735-455B-8EE0-549C06FA0D5A}.png"))); // NOI18N


jButton10.setBackground(new java.awt.Color(153, 153, 255));

jButton10.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton10.setForeground(new java.awt.Color(255, 255, 255));

jButton10.setText("Credit");

jButton10.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton10ActionPerformed(evt);

});

jLabel20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/{F13103B1-8861-4562-931B-A0AA71F8EEEC}.png"))); // NOI18N

jButton11.setBackground(new java.awt.Color(153, 153, 255));

jButton11.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton11.setForeground(new java.awt.Color(255, 255, 255));

jButton11.setText("Transfer");

jButton11.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton11ActionPerformed(evt);

});

jLabel1.setFont(new java.awt.Font("Bookman Old Style", 3, 24)); // NOI18N

jLabel12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

jButton1.setBackground(new java.awt.Color(255, 0, 0));

jButton1.setText("User Sign Out");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo Maker - Logo Creator, Generator & Designer6_24_2019_6_53_18_PM.png"))); // NOI18N

javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);

jPanel5.setLayout(jPanel5Layout);

jPanel5Layout.setHorizontalGroup(

jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addGap(79, 79, 79)


.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)

.addComponent(jLabel10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,


Short.MAX_VALUE)

.addComponent(jLabel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 67,


javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGap(61, 61, 61)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jButton6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel5Layout.createSequentialGroup()

.addGap(2, 2, 2)

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel5Layout.createSequentialGroup()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()

.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(62, 62, 62))

.addGroup(jPanel5Layout.createSequentialGroup()

.addGap(1, 1, 1)

.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(61, 61, 61)))

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jButton11, javax.swing.GroupLayout.DEFAULT_SIZE, 168, Short.MAX_VALUE)

.addComponent(jButton10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jButton9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))

.addGroup(jPanel5Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jButton1)

.addGap(170, 170, 170)

.addComponent(jLabel12)))

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addGap(18, 18, 18)

.addComponent(jLabel2))

.addGroup(jPanel5Layout.createSequentialGroup()

.addGap(77, 77, 77)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 418, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap(577, Short.MAX_VALUE))

);
jPanel5Layout.setVerticalGroup(

jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel5Layout.createSequentialGroup()

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(40, 40, 40))

.addComponent(jLabel12, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 108,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(93, 93, 93)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(22, 22, 22)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 48, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(16, 16, 16)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel11)

.addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jButton10, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jButton11, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel5Layout.createSequentialGroup()

.addGap(20, 20, 20)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel2)))

.addContainerGap(407, Short.MAX_VALUE))

);
sp1.setViewportView(jPanel5);

jMenu1.setText("Actions");

jMenu1.add(jSeparator1);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem4.setText("New account");

jMenu1.add(jMenuItem4);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem3.setText("Update user data");

jMenu1.add(jMenuItem3);

jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem8.setText("Search full details");

jMenuItem8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem8ActionPerformed(evt);

});

jMenu1.add(jMenuItem8);

jMenu1.add(jSeparator2);

jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem9.setText("show all data");

jMenuItem9.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem9ActionPerformed(evt);

});

jMenu1.add(jMenuItem9);

jMenuBar1.add(jMenu1);

jMenu2.setText("Window");

jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem1.setText("Log Out");

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu2.add(jMenuItem1);
jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Home");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu2.add(jMenuItem2);

jMenuBar1.add(jMenu2);

jMenu3.setText("About");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem6.setText("How to use");

jMenuItem6.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem6ActionPerformed(evt);

});

jMenu3.add(jMenuItem6);

jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem7.setText("Exit");

jMenu3.add(jMenuItem7);

jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(sp1, javax.swing.GroupLayout.DEFAULT_SIZE, 1200, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(sp1, javax.swing.GroupLayout.DEFAULT_SIZE, 715, Short.MAX_VALUE)

);

pack();

setLocationRelativeTo(null);
}// </editor-fold>

private void l2MouseClicked(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

String a=l2.getSelectedValue();

listvalue=a;

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(l2.isSelectedIndex(1))

{ new tuser().setVisible(true);

this.setVisible(false);

jDialog1.dispose();

else if(l2.isSelectedIndex(0))

{new transaction().setVisible(true);

this.setVisible(false);

jDialog1.dispose();}

else JOptionPane.showMessageDialog(rootPane,"Please select one of the table.");

private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Edit1().setVisible(true);

this.setVisible(false);

private void jPanel5MouseDragged(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jPanel5MouseMoved(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jPanel5MouseEntered(java.awt.event.MouseEvent evt) {


// TODO add your handling code here:

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Login().setVisible(true);

this.setVisible(false);

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void l2MouseEntered(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jDialog1.setVisible(true);

private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new insertpage().setVisible(true);

this.setVisible(false);

private void formWindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

jLabel1.setText("@ "+user+" authorised");

private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:


new Update().setVisible(true);

this.setVisible(false);

private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Dabit().setVisible(true);

this.setVisible(false);

private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Credit().setVisible(true);

this.setVisible(false);

private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Trans().setVisible(true);

this.setVisible(false);

private void jDialog1WindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

DefaultListModel dlm2= (DefaultListModel) l2.getModel();

Object a;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="show tables;";

stmt.executeUpdate(query);

ResultSet rs=stmt.executeQuery(query);

dlm2.removeAllElements();

rs.absolute(2);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

rs.absolute(3);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);
stmt.close();

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Users().setVisible(true);

this.setVisible(false);

private void jMenuItem6ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

/**

* @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(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Home.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);


} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Home.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 Home().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton10;

private javax.swing.JButton jButton11;

private javax.swing.JButton jButton4;

private javax.swing.JButton jButton5;

private javax.swing.JButton jButton6;

private javax.swing.JButton jButton7;

private javax.swing.JButton jButton9;

private javax.swing.JDialog jDialog1;

private javax.swing.JLabel jLabel1;

private javax.swing.JLabel jLabel10;

private javax.swing.JLabel jLabel11;

private javax.swing.JLabel jLabel12;

private javax.swing.JLabel jLabel16;

private javax.swing.JLabel jLabel19;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel20;

private javax.swing.JLabel jLabel5;

private javax.swing.JLabel jLabel6;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem5;


private javax.swing.JMenuItem jMenuItem6;

private javax.swing.JMenuItem jMenuItem7;

private javax.swing.JMenuItem jMenuItem8;

private javax.swing.JMenuItem jMenuItem9;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel5;

private javax.swing.JPanel jPanel6;

private javax.swing.JScrollPane jScrollPane4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JPopupMenu.Separator jSeparator2;

private javax.swing.JList<String> l2;

private javax.swing.JScrollPane sp1;

// End of variables declaration

Insert page

/*

* 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 school.project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import static school.project.User_database_info.Database;

import static school.project.User_database_info.AccNo;

import javax.swing.DefaultListModel;

import static school.project.User_database_info.listvalue;

/**

* @author admin

*/

public class insertpage extends javax.swing.JFrame {

/**

* Creates new form insertpage

*/
public insertpage() {

initComponents();

/**

* 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() {

buttonGroup1 = new javax.swing.ButtonGroup();

jDialog1 = new javax.swing.JDialog();

jPanel2 = new javax.swing.JPanel();

jPanel6 = new javax.swing.JPanel();

jScrollPane4 = new javax.swing.JScrollPane();

l2 = new javax.swing.JList<>();

jLabel24 = new javax.swing.JLabel();

jLabel25 = new javax.swing.JLabel();

jButton5 = new javax.swing.JButton();

jLabel26 = new javax.swing.JLabel();

buttonGroup2 = new javax.swing.ButtonGroup();

jScrollPane1 = new javax.swing.JScrollPane();

jPanel1 = new javax.swing.JPanel();

jLabel1 = new javax.swing.JLabel();

jButton2 = new javax.swing.JButton();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

jLabel10 = new javax.swing.JLabel();

jLabel11 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jLabel15 = new javax.swing.JLabel();

jLabel13 = new javax.swing.JLabel();

jLabel14 = new javax.swing.JLabel();

tf1 = new javax.swing.JTextField();

tf2 = new javax.swing.JTextField();


tf4 = new javax.swing.JTextField();

tf5 = new javax.swing.JTextField();

tf7 = new javax.swing.JTextField();

tf8 = new javax.swing.JTextField();

tf9 = new javax.swing.JTextField();

tf10 = new javax.swing.JTextField();

tf11 = new javax.swing.JTextField();

tf12 = new javax.swing.JTextField();

tf13 = new javax.swing.JTextField();

tf14 = new javax.swing.JTextField();

r1 = new javax.swing.JRadioButton();

r2 = new javax.swing.JRadioButton();

jLabel16 = new javax.swing.JLabel();

jLabel17 = new javax.swing.JLabel();

jScrollPane2 = new javax.swing.JScrollPane();

tf6 = new javax.swing.JTextArea();

c1 = new javax.swing.JCheckBox();

c2 = new javax.swing.JCheckBox();

c3 = new javax.swing.JCheckBox();

c4 = new javax.swing.JCheckBox();

c5 = new javax.swing.JCheckBox();

jLabel18 = new javax.swing.JLabel();

jLabel19 = new javax.swing.JLabel();

jLabel20 = new javax.swing.JLabel();

jLabel21 = new javax.swing.JLabel();

jLabel22 = new javax.swing.JLabel();

jLabel27 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuItem8 = new javax.swing.JMenuItem();

jSeparator2 = new javax.swing.JPopupMenu.Separator();

jMenuItem9 = new javax.swing.JMenuItem();

jMenu2 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

jMenuItem6 = new javax.swing.JMenuItem();

jMenuItem7 = new javax.swing.JMenuItem();

jDialog1.addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {

jDialog1WindowOpened(evt);

});

jPanel2.setBackground(new java.awt.Color(204, 0, 102));

jPanel6.setBackground(new java.awt.Color(0, 153, 204));

l2.setFont(new java.awt.Font("Arial", 3, 18)); // NOI18N

l2.setModel(new DefaultListModel());

l2.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

l2MouseClicked(evt);

public void mouseEntered(java.awt.event.MouseEvent evt) {

l2MouseEntered(evt);

});

jScrollPane4.setViewportView(l2);

jLabel24.setFont(new java.awt.Font("Times New Roman", 2, 12)); // NOI18N

jLabel24.setForeground(new java.awt.Color(255, 255, 255));

jLabel24.setText("Select one of the tables");

jLabel25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

jPanel6.setLayout(jPanel6Layout);

jPanel6Layout.setHorizontalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jLabel25))

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(40, 40, 40)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE)))

.addContainerGap())

.addGroup(jPanel6Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)


.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel6Layout.setVerticalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addComponent(jLabel25)

.addGap(29, 29, 29)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jLabel24)

.addContainerGap(59, Short.MAX_VALUE))

);

jButton5.setBackground(new java.awt.Color(0, 102, 255));

jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton5.setForeground(new java.awt.Color(255, 255, 255));

jButton5.setText("Show Records");

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

});

jLabel26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Annotation 2019-05-21 091950.png"))); // NOI18N

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5))

.addGap(138, 138, 138))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 22, Short.MAX_VALUE))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(236, 236, 236)


.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

jPanel1.setBackground(new java.awt.Color(204, 102, 255));

jLabel1.setFont(new java.awt.Font("Algerian", 3, 36)); // NOI18N

jLabel1.setText("Registration of a new user");

jButton2.setText("Submit");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

jLabel2.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel2.setText("Account No.");

jLabel3.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel3.setText("Name");

jLabel4.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel4.setText("Authentication Proof :");

jLabel5.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel5.setText("Father's Name");

jLabel6.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N


jLabel6.setText("Mother's Name");

jLabel7.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel7.setText("Address");

jLabel8.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel8.setText("Aadhar Card");

jLabel9.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel9.setText("Pan Card");

jLabel10.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel10.setText("Voter Id Card");

jLabel11.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel11.setText("Driving Liences");

jLabel12.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel12.setText("Passport");

jLabel15.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel15.setText("Current Balance");

jLabel13.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel13.setText("Account Type ");

jLabel14.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel14.setText("Mobile No.");

tf1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf1ActionPerformed(evt);

});

tf2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf2ActionPerformed(evt);

});

tf4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf4ActionPerformed(evt);
}

});

tf5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf5ActionPerformed(evt);

});

tf7.setBackground(new java.awt.Color(204, 255, 255));

tf8.setEditable(false);

tf8.setBackground(new java.awt.Color(204, 255, 255));

tf8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf8ActionPerformed(evt);

});

tf9.setEditable(false);

tf9.setBackground(new java.awt.Color(204, 255, 255));

tf10.setEditable(false);

tf10.setBackground(new java.awt.Color(204, 255, 255));

tf10.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf10ActionPerformed(evt);

});

tf11.setEditable(false);

tf11.setBackground(new java.awt.Color(204, 255, 255));

tf12.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf12ActionPerformed(evt);

});

tf14.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf14ActionPerformed(evt);

});
buttonGroup1.add(r1);

r1.setText("Male");

buttonGroup1.add(r2);

r2.setText("Female");

jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/1.jpg"))); // NOI18N

jLabel17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/2.jpg"))); // NOI18N

tf6.setColumns(20);

tf6.setRows(5);

jScrollPane2.setViewportView(tf6);

c1.setSelected(true);

c1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c1ActionPerformed(evt);

});

c2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c2ActionPerformed(evt);

});

c3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c3ActionPerformed(evt);

});

c4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c4ActionPerformed(evt);

});

c5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c5ActionPerformed(evt);

}
});

jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Aadhar.jpg"))); // NOI18N

jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Pan.jpg"))); // NOI18N

jLabel20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Voter.jpg"))); // NOI18N

jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Driving.jpg"))); // NOI18N

jLabel22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Passport.jpg"))); // NOI18N

jLabel27.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

jButton1.setText("Back");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(168, 168, 168)

.addComponent(jLabel2))

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jButton1)

.addGap(337, 337, 337)

.addComponent(jLabel27))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(127, 127, 127)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(1, 1, 1)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(30, 30, 30)

.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel13)))))

.addComponent(jLabel15, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 244,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(tf5, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf4, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf13, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf12, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(36, 36, 36)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)

.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()

.addGap(586, 586, 586)

.addComponent(c1)

.addGap(6, 6, 6)

.addComponent(jLabel18)

.addGap(18, 18, 18)

.addComponent(tf7, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(220, 220, 220))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c5)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel12)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(tf11, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c3)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGap(56, 56, 56)

.addComponent(tf9, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel11)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel21)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(tf10, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c2)

.addGap(6, 6, 6)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(6, 6, 6)

.addComponent(tf8, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE))

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)))))

.addGap(208, 208, 208)))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(586, 586, 586)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(41, 41, 41)

.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(67, 67, 67)

.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(r1)

.addGap(49, 49, 49)


.addComponent(jLabel17)

.addGap(18, 18, 18)

.addComponent(r2))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(47, 47, 47)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(tf14, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(359, 359, 359))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(15, 15, 15)

.addComponent(jLabel14)))

.addGap(256, 256, 256))))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(303, 303, 303)

.addComponent(jLabel1)))

.addContainerGap(773, Short.MAX_VALUE))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jButton1)))

.addGap(18, 18, 18)

.addComponent(jLabel1)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(41, 41, 41)

.addComponent(jLabel2)

.addGap(68, 68, 68)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel16))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(25, 25, 25)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(r2)

.addComponent(r1))))

.addGap(73, 73, 73)


.addComponent(jLabel4)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(77, 77, 77)

.addComponent(tf7, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(46, 46, 46)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(c1)

.addComponent(jLabel18))))

.addGap(2, 2, 2)

.addComponent(jLabel8)

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(33, 33, 33)

.addComponent(tf9, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(c3)

.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addComponent(jLabel10))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(47, 47, 47)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(22, 22, 22)

.addComponent(tf5, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(18, 18, 18)

.addComponent(jLabel6)))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(151, 151, 151)


.addComponent(jLabel7))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(26, 26, 26)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf13, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel13))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf12, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addGap(18, 18, 18)

.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(50, 50, 50)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel14)

.addComponent(tf14, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))))))

.addGap(12, 12, 12)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel22)

.addComponent(tf11, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel12))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c5)

.addGap(26, 26, 26)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(4, 4, 4)

.addComponent(c2))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(tf8, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel9)))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, javax.swing.GroupLayout.PREFERRED_SIZE)


.addComponent(c4))

.addComponent(jLabel21))

.addComponent(tf10, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel11)

.addContainerGap(686, Short.MAX_VALUE))

);

jScrollPane1.setViewportView(jPanel1);

jMenu1.setText("Actions");

jMenu1.add(jSeparator1);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem4.setText("New account");

jMenu1.add(jMenuItem4);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem3.setText("Update user data");

jMenu1.add(jMenuItem3);

jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem8.setText("Search full details");

jMenuItem8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem8ActionPerformed(evt);

});

jMenu1.add(jMenuItem8);

jMenu1.add(jSeparator2);

jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem9.setText("show all data");

jMenuItem9.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem9ActionPerformed(evt);

});

jMenu1.add(jMenuItem9);

jMenuBar1.add(jMenu1);

jMenu2.setText("Window");
jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem1.setText("Log Out");

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu2.add(jMenuItem1);

jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Home");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu2.add(jMenuItem2);

jMenuBar1.add(jMenu2);

jMenu3.setText("About");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem6.setText("How to use");

jMenu3.add(jMenuItem6);

jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem7.setText("Exit");

jMenu3.add(jMenuItem7);

jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1200, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 715, Short.MAX_VALUE)

);
pack();

setLocationRelativeTo(null);

}// </editor-fold>

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

Object a,b,c = null,d,e,f,g,h,i,j,k,l,m,n;

a=tf1.getText();

b=tf2.getText();

if(r1.isSelected() )

c="M";

else if(r2.isSelected())

c="F";

else

JOptionPane.showMessageDialog(rootPane,"Please Select User's Gender");

d=tf4.getText();

e=tf5.getText();

i=tf9.getText();

j=tf10.getText();

f=tf6.getText();

l=Float.parseFloat(tf12.getText());

h=tf8.getText();

k=tf11.getText();

g=tf7.getText();

m=tf13.getText();

n=tf14.getText();

try{

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String sql;

sql="Insert into users values('"+a+"','"+b+"','"+c+"','"+d+"','"+e+"','"+f+"','"+g+"','"+h+"','"+i+"','"+j+"','"+k+"',"+l+",'"+m+"','"+n+"');";

stmt.executeUpdate(sql);

JOptionPane.showMessageDialog(null,"User Successfully Registered");

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

tf1.setText("");

tf2.setText("");
r1.setSelected(false);

r2.setSelected(false);

tf4.setText("");

tf5.setText("");

tf6.setText("");

tf7.setText("");

tf8.setText("");

tf9.setText("");

tf10.setText("");

tf11.setText("");

tf12.setText("");

tf13.setText("");

tf14.setText("");

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jDialog1.setVisible(true);

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Login().setVisible(true);

this.setVisible(false);

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void l2MouseClicked(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

String a=l2.getSelectedValue();

listvalue=a;

}
private void l2MouseEntered(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(l2.isSelectedIndex(1))

{ new tuser().setVisible(true);

this.setVisible(false);

jDialog1.dispose();

else if(l2.isSelectedIndex(0))

{new transaction().setVisible(true);

this.setVisible(false);

jDialog1.dispose();}

else JOptionPane.showMessageDialog(rootPane,"Please select one of the table.");

private void jDialog1WindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

DefaultListModel dlm2= (DefaultListModel) l2.getModel();

Object a;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="show tables;";

stmt.executeUpdate(query);

ResultSet rs=stmt.executeQuery(query);

dlm2.removeAllElements();

rs.absolute(2);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

rs.absolute(3);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

stmt.close();

}
catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void tf1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf4ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf10ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf12ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf14ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void c1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void c2ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:

if(c2.isSelected())

tf8.setEditable(true);

else

tf8.setEditable(false);

private void c3ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c3.isSelected())

tf9.setEditable(true);

else

tf9.setEditable(false);

private void c4ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c4.isSelected())

tf10.setEditable(true);

else

tf10.setEditable(false);

private void c5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c5.isSelected())

tf11.setEditable(true);

else

tf11.setEditable(false);

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

/**

* @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(insertpage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(insertpage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(insertpage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(insertpage.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 insertpage().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.ButtonGroup buttonGroup1;

private javax.swing.ButtonGroup buttonGroup2;

private javax.swing.JCheckBox c1;

private javax.swing.JCheckBox c2;

private javax.swing.JCheckBox c3;

private javax.swing.JCheckBox c4;

private javax.swing.JCheckBox c5;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton5;

private javax.swing.JDialog jDialog1;

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 jLabel15;

private javax.swing.JLabel jLabel16;

private javax.swing.JLabel jLabel17;

private javax.swing.JLabel jLabel18;

private javax.swing.JLabel jLabel19;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel20;

private javax.swing.JLabel jLabel21;

private javax.swing.JLabel jLabel22;

private javax.swing.JLabel jLabel24;

private javax.swing.JLabel jLabel25;

private javax.swing.JLabel jLabel26;

private javax.swing.JLabel jLabel27;

private javax.swing.JLabel jLabel3;

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.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem6;

private javax.swing.JMenuItem jMenuItem7;

private javax.swing.JMenuItem jMenuItem8;

private javax.swing.JMenuItem jMenuItem9;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel6;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JScrollPane jScrollPane2;

private javax.swing.JScrollPane jScrollPane4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JPopupMenu.Separator jSeparator2;

private javax.swing.JList<String> l2;

private javax.swing.JRadioButton r1;


private javax.swing.JRadioButton r2;

private javax.swing.JTextField tf1;

private javax.swing.JTextField tf10;

private javax.swing.JTextField tf11;

private javax.swing.JTextField tf12;

private javax.swing.JTextField tf13;

private javax.swing.JTextField tf14;

private javax.swing.JTextField tf2;

private javax.swing.JTextField tf4;

private javax.swing.JTextField tf5;

private javax.swing.JTextArea tf6;

private javax.swing.JTextField tf7;

private javax.swing.JTextField tf8;

private javax.swing.JTextField tf9;

// End of variables declaration

Update

/*

* 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 school.project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import javax.swing.table.DefaultTableModel;

import static school.project.User_database_info.Database;

import static school.project.User_database_info.AccNo;

import javax.swing.DefaultListModel;

import static school.project.User_database_info.listvalue;

/**

* @author Yogesh Kumar Sahoo

*/

public class Update extends javax.swing.JFrame {

/**
* Creates new form Update

*/

public Update() {

initComponents();

/**

* 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() {

buttonGroup1 = new javax.swing.ButtonGroup();

jDialog1 = new javax.swing.JDialog();

jPanel2 = new javax.swing.JPanel();

jPanel6 = new javax.swing.JPanel();

jScrollPane4 = new javax.swing.JScrollPane();

l2 = new javax.swing.JList<>();

jLabel24 = new javax.swing.JLabel();

jLabel25 = new javax.swing.JLabel();

jButton5 = new javax.swing.JButton();

jLabel26 = new javax.swing.JLabel();

jScrollPane1 = new javax.swing.JScrollPane();

jPanel1 = new javax.swing.JPanel();

jButton2 = new javax.swing.JButton();

jLabel1 = new javax.swing.JLabel();

jButton3 = new javax.swing.JButton();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

jLabel10 = new javax.swing.JLabel();

jLabel11 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jLabel15 = new javax.swing.JLabel();

jLabel13 = new javax.swing.JLabel();

jLabel14 = new javax.swing.JLabel();


tf1 = new javax.swing.JTextField();

tf2 = new javax.swing.JTextField();

tf4 = new javax.swing.JTextField();

tf5 = new javax.swing.JTextField();

tf7 = new javax.swing.JTextField();

tf8 = new javax.swing.JTextField();

tf9 = new javax.swing.JTextField();

tf10 = new javax.swing.JTextField();

tf11 = new javax.swing.JTextField();

tf12 = new javax.swing.JTextField();

tf13 = new javax.swing.JTextField();

tf14 = new javax.swing.JTextField();

r1 = new javax.swing.JRadioButton();

r2 = new javax.swing.JRadioButton();

jLabel16 = new javax.swing.JLabel();

jLabel17 = new javax.swing.JLabel();

jScrollPane2 = new javax.swing.JScrollPane();

tf6 = new javax.swing.JTextArea();

c1 = new javax.swing.JCheckBox();

c2 = new javax.swing.JCheckBox();

c3 = new javax.swing.JCheckBox();

c4 = new javax.swing.JCheckBox();

c5 = new javax.swing.JCheckBox();

jLabel18 = new javax.swing.JLabel();

jLabel19 = new javax.swing.JLabel();

jLabel20 = new javax.swing.JLabel();

jLabel21 = new javax.swing.JLabel();

jLabel22 = new javax.swing.JLabel();

jLabel27 = new javax.swing.JLabel();

jButton1 = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuItem8 = new javax.swing.JMenuItem();

jSeparator2 = new javax.swing.JPopupMenu.Separator();

jMenuItem9 = new javax.swing.JMenuItem();

jMenu2 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

jMenuItem6 = new javax.swing.JMenuItem();

jMenuItem7 = new javax.swing.JMenuItem();


jDialog1.addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

jDialog1WindowOpened(evt);

});

jPanel2.setBackground(new java.awt.Color(204, 0, 102));

jPanel6.setBackground(new java.awt.Color(0, 153, 204));

l2.setFont(new java.awt.Font("Arial", 3, 18)); // NOI18N

l2.setModel(new DefaultListModel());

l2.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

l2MouseClicked(evt);

public void mouseEntered(java.awt.event.MouseEvent evt) {

l2MouseEntered(evt);

});

jScrollPane4.setViewportView(l2);

jLabel24.setFont(new java.awt.Font("Times New Roman", 2, 12)); // NOI18N

jLabel24.setForeground(new java.awt.Color(255, 255, 255));

jLabel24.setText("Select one of the tables");

jLabel25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

jPanel6.setLayout(jPanel6Layout);

jPanel6Layout.setHorizontalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jLabel25))

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(40, 40, 40)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE)))

.addContainerGap())

.addGroup(jPanel6Layout.createSequentialGroup()
.addContainerGap()

.addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel6Layout.setVerticalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addComponent(jLabel25)

.addGap(29, 29, 29)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jLabel24)

.addContainerGap(59, Short.MAX_VALUE))

);

jButton5.setBackground(new java.awt.Color(0, 102, 255));

jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton5.setForeground(new java.awt.Color(255, 255, 255));

jButton5.setText("Show Records");

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

});

jLabel26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Annotation 2019-05-21 091950.png"))); // NOI18N

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5))

.addGap(138, 138, 138))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 22, Short.MAX_VALUE))


.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(236, 236, 236)

.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

formWindowOpened(evt);

});

jPanel1.setBackground(new java.awt.Color(0, 204, 204));

jButton2.setText("Update");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

jLabel1.setFont(new java.awt.Font("Algerian", 3, 36)); // NOI18N

jLabel1.setText("modifIcation of user");

jButton3.setText("Update on this Account");

jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

});
jLabel2.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel2.setText("Account No.");

jLabel3.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel3.setText("Name");

jLabel4.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel4.setText("Authentication Proof :");

jLabel5.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel5.setText("Father's Name");

jLabel6.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel6.setText("Mother's Name");

jLabel7.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel7.setText("Address");

jLabel8.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel8.setText("Aadhar Card");

jLabel9.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel9.setText("Pan Card");

jLabel10.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel10.setText("Voter Id Card");

jLabel11.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel11.setText("Driving Liences");

jLabel12.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel12.setText("Passport");

jLabel15.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel15.setText("Current Balance");

jLabel13.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel13.setText("Account Type ");

jLabel14.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel14.setText("Mobile No.");

tf1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {

tf1ActionPerformed(evt);

});

tf2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf2ActionPerformed(evt);

});

tf4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf4ActionPerformed(evt);

});

tf5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf5ActionPerformed(evt);

});

tf7.setBackground(new java.awt.Color(204, 255, 255));

tf8.setEditable(false);

tf8.setBackground(new java.awt.Color(204, 255, 255));

tf8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf8ActionPerformed(evt);

});

tf9.setEditable(false);

tf9.setBackground(new java.awt.Color(204, 255, 255));

tf10.setEditable(false);

tf10.setBackground(new java.awt.Color(204, 255, 255));

tf10.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf10ActionPerformed(evt);

});
tf11.setEditable(false);

tf11.setBackground(new java.awt.Color(204, 255, 255));

tf12.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf12ActionPerformed(evt);

});

tf14.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf14ActionPerformed(evt);

});

buttonGroup1.add(r1);

r1.setText("Male");

buttonGroup1.add(r2);

r2.setText("Female");

jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/1.jpg"))); // NOI18N

jLabel17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/2.jpg"))); // NOI18N

tf6.setColumns(20);

tf6.setRows(5);

jScrollPane2.setViewportView(tf6);

c1.setSelected(true);

c1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c1ActionPerformed(evt);

});

c2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c2ActionPerformed(evt);

});

c3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


c3ActionPerformed(evt);

});

c4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c4ActionPerformed(evt);

});

c5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c5ActionPerformed(evt);

});

jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Aadhar.jpg"))); // NOI18N

jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Pan.jpg"))); // NOI18N

jLabel20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Voter.jpg"))); // NOI18N

jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Driving.jpg"))); // NOI18N

jLabel22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Passport.jpg"))); // NOI18N

jLabel27.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

jButton1.setText("Back");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(278, 278, 278)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 433, javax.swing.GroupLayout.PREFERRED_SIZE))


.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(137, 137, 137)

.addComponent(jLabel2)

.addGap(73, 73, 73)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(30, 30, 30)

.addComponent(jButton1)

.addGap(286, 286, 286)

.addComponent(jLabel27))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(688, 688, 688)

.addComponent(c4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel11)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel21)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(tf10, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(97, 97, 97)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(30, 30, 30)

.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel13))))

.addGap(59, 59, 59))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 204, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(44, 44, 44)))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(tf5, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf4, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf13, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf12, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)


.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(132, 132, 132)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(81, 81, 81)

.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(271, 271, 271)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(41, 41, 41)

.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(67, 67, 67)

.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(r1)

.addGap(49, 49, 49)

.addComponent(jLabel17)

.addGap(18, 18, 18)

.addComponent(r2))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(586, 586, 586)

.addComponent(c1)

.addGap(6, 6, 6)

.addComponent(jLabel18)

.addGap(18, 18, 18)

.addComponent(tf7, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(220, 220, 220))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(147, 147, 147)

.addComponent(jLabel14))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(179, 179, 179)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(tf14, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(359, 359, 359))))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addGap(194, 194, 194)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 263, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c5)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel12)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(tf11, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c3)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGap(56, 56, 56)

.addComponent(tf9, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c2)

.addGap(6, 6, 6)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(6, 6, 6)

.addComponent(tf8, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE))

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGap(208, 208, 208)))

.addContainerGap(1238, Short.MAX_VALUE))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(27, 27, 27)

.addComponent(jButton1))

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGap(30, 30, 30)

.addComponent(jLabel1)
.addGap(29, 29, 29)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(68, 68, 68)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel16))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(25, 25, 25)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(r2)

.addComponent(r1))))

.addGap(73, 73, 73)

.addComponent(jLabel4)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(77, 77, 77)

.addComponent(tf7, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(46, 46, 46)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(c1)

.addComponent(jLabel18))))

.addGap(2, 2, 2)

.addComponent(jLabel8)

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(33, 33, 33)

.addComponent(tf9, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(c3)

.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addComponent(jLabel10))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(26, 26, 26)


.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(35, 35, 35)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(22, 22, 22)

.addComponent(tf5, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(18, 18, 18)

.addComponent(jLabel6)))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(151, 151, 151)

.addComponent(jLabel7))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(26, 26, 26)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf13, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel13))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf12, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addGap(18, 18, 18)

.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(50, 50, 50)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel14)

.addComponent(tf14, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))))))

.addGap(11, 11, 11)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel22)

.addComponent(tf11, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel12))

.addComponent(c5))
.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(4, 4, 4)

.addComponent(c2))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(tf8, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel9)))

.addContainerGap(623, Short.MAX_VALUE))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(c4))

.addComponent(jLabel21))

.addComponent(tf10, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel11)

.addGap(471, 471, 471))))

);

jScrollPane1.setViewportView(jPanel1);

jMenu1.setText("Actions");

jMenu1.add(jSeparator1);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem4.setText("New account");

jMenu1.add(jMenuItem4);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem3.setText("Update user data");

jMenu1.add(jMenuItem3);

jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem8.setText("Search full details");

jMenuItem8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


jMenuItem8ActionPerformed(evt);

});

jMenu1.add(jMenuItem8);

jMenu1.add(jSeparator2);

jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem9.setText("show all data");

jMenuItem9.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem9ActionPerformed(evt);

});

jMenu1.add(jMenuItem9);

jMenuBar1.add(jMenu1);

jMenu2.setText("Window");

jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem1.setText("Log Out");

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu2.add(jMenuItem1);

jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Home");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu2.add(jMenuItem2);

jMenuBar1.add(jMenu2);

jMenu3.setText("About");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem6.setText("How to use");

jMenu3.add(jMenuItem6);
jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem7.setText("Exit");

jMenu3.add(jMenuItem7);

jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1200, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 715, Short.MAX_VALUE)

);

pack();

setLocationRelativeTo(null);

}// </editor-fold>

private void formWindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

tf1.setText(AccNo+"");

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

Object a,b,c = null,d,e,f,g,h,i,j,k,l,m,n;

a=tf1.getText();

b=tf2.getText();

if(r1.isSelected() )

c="M";

else if(r2.isSelected())

c="F";

else

JOptionPane.showMessageDialog(rootPane,"Please Select User's Gender");

d=tf4.getText();

e=tf5.getText();

i=tf9.getText();

j=tf10.getText();
f=tf6.getText();

l=Float.parseFloat(tf12.getText());

h=tf8.getText();

k=tf11.getText();

g=tf7.getText();

m=tf13.getText();

n=tf14.getText();

try{

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String sql;

sql="update users set Account_no='"+a+"',name='"+b+"',


sex='"+c+"',f_name='"+d+"',m_name='"+e+"',address='"+f+"',aadhar_card='"+g+"',pan_card='"+h+"',voter_id_card='"+i+"',passport_id='"+j+"',driving_lic='"+k+"',current_bal="+l+
",account_type='"+m+"',mobile_no='"+n+"' where account_no="+tf1.getText()+";";

stmt.executeUpdate(sql);

JOptionPane.showMessageDialog(null,"User Successfully Updated");

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

Object k,l,m,n,o,p,q,r,s,u,v,w,x,y;

k=tf1.getText();

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="select * from users where account_no='"+k+"';";

ResultSet rs=stmt.executeQuery(query);

while(rs.next()){

k=rs.getString(1);

l=rs.getString(2);

m=rs.getString(3);
n=rs.getString(4);

o=rs.getString(5);

p=rs.getString(6);

q=rs.getString(7);

r=rs.getString(8);

s=rs.getString(9);

u=rs.getString(10);

v=rs.getString(11);

w=rs.getFloat(12);

x=rs.getString(13);

y=rs.getString(14);

tf1.setText(k+"");

tf2.setText(l+"");

if(m.equals("M"))

r1.setSelected(true);

else if(m.equals("F"))

r2.setSelected(true);

tf4.setText(n+"");

tf5.setText(o+"");

tf6.setText(p+"");

tf7.setText(q+"");

tf8.setText(r+"");

tf9.setText(s+"");

tf10.setText(u+"");

tf11.setText(v+"");

tf12.setText(w+"");

tf13.setText(x+"");

tf14.setText(y+"");

rs.close();

stmt.close();

conn.close();

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jDialog1.setVisible(true);

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Login().setVisible(true);

this.setVisible(false);

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void l2MouseClicked(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

String a=l2.getSelectedValue();

listvalue=a;

private void l2MouseEntered(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(l2.isSelectedIndex(1))

{ new tuser().setVisible(true);

this.setVisible(false);

jDialog1.dispose();

else if(l2.isSelectedIndex(0))

{new transaction().setVisible(true);

this.setVisible(false);

jDialog1.dispose();}

else JOptionPane.showMessageDialog(rootPane,"Please select one of the table.");

}
private void jDialog1WindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

DefaultListModel dlm2= (DefaultListModel) l2.getModel();

Object a;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="show tables;";

stmt.executeUpdate(query);

ResultSet rs=stmt.executeQuery(query);

dlm2.removeAllElements();

rs.absolute(2);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

rs.absolute(3);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

stmt.close();

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void tf1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf4ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

}
private void tf5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf10ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf12ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf14ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void c1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void c2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c2.isSelected())

tf8.setEditable(true);

else

tf8.setEditable(false);

private void c3ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c3.isSelected())

tf9.setEditable(true);

else

tf9.setEditable(false);

private void c4ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c4.isSelected())
tf10.setEditable(true);

else

tf10.setEditable(false);

private void c5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c5.isSelected())

tf11.setEditable(true);

else

tf11.setEditable(false);

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

/**

* @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(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Update.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 Update().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.ButtonGroup buttonGroup1;

private javax.swing.JCheckBox c1;

private javax.swing.JCheckBox c2;

private javax.swing.JCheckBox c3;

private javax.swing.JCheckBox c4;

private javax.swing.JCheckBox c5;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JButton jButton5;

private javax.swing.JDialog jDialog1;

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 jLabel15;

private javax.swing.JLabel jLabel16;

private javax.swing.JLabel jLabel17;

private javax.swing.JLabel jLabel18;

private javax.swing.JLabel jLabel19;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel20;

private javax.swing.JLabel jLabel21;

private javax.swing.JLabel jLabel22;

private javax.swing.JLabel jLabel24;

private javax.swing.JLabel jLabel25;

private javax.swing.JLabel jLabel26;

private javax.swing.JLabel jLabel27;

private javax.swing.JLabel jLabel3;

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.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem6;

private javax.swing.JMenuItem jMenuItem7;

private javax.swing.JMenuItem jMenuItem8;

private javax.swing.JMenuItem jMenuItem9;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel6;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JScrollPane jScrollPane2;

private javax.swing.JScrollPane jScrollPane4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JPopupMenu.Separator jSeparator2;

private javax.swing.JList<String> l2;

private javax.swing.JRadioButton r1;

private javax.swing.JRadioButton r2;

private javax.swing.JTextField tf1;

private javax.swing.JTextField tf10;

private javax.swing.JTextField tf11;

private javax.swing.JTextField tf12;

private javax.swing.JTextField tf13;

private javax.swing.JTextField tf14;

private javax.swing.JTextField tf2;

private javax.swing.JTextField tf4;

private javax.swing.JTextField tf5;

private javax.swing.JTextArea tf6;

private javax.swing.JTextField tf7;

private javax.swing.JTextField tf8;

private javax.swing.JTextField tf9;

// End of variables declaration

Edit1
/*

* 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 school.project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import javax.swing.table.DefaultTableModel;

import static school.project.User_database_info.AccNo;

import static school.project.User_database_info.Database;

import javax.swing.DefaultListModel;

import static school.project.User_database_info.listvalue;

/**

* @author Yogesh Kumar Sahoo

*/

public class Edit1 extends javax.swing.JFrame {

/**

* Creates new form edit

*/

public Edit1() {

initComponents();

/**

* 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() {

buttonGroup1 = new javax.swing.ButtonGroup();

jDialog1 = new javax.swing.JDialog();

jPanel2 = new javax.swing.JPanel();

jPanel6 = new javax.swing.JPanel();


jScrollPane4 = new javax.swing.JScrollPane();

l2 = new javax.swing.JList<>();

jLabel24 = new javax.swing.JLabel();

jLabel25 = new javax.swing.JLabel();

jButton5 = new javax.swing.JButton();

jLabel26 = new javax.swing.JLabel();

jScrollPane1 = new javax.swing.JScrollPane();

jPanel1 = new javax.swing.JPanel();

jButton1 = new javax.swing.JButton();

jLabel2 = new javax.swing.JLabel();

jLabel3 = new javax.swing.JLabel();

jLabel4 = new javax.swing.JLabel();

jLabel5 = new javax.swing.JLabel();

jLabel6 = new javax.swing.JLabel();

jLabel7 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jLabel9 = new javax.swing.JLabel();

jLabel10 = new javax.swing.JLabel();

jLabel11 = new javax.swing.JLabel();

jLabel12 = new javax.swing.JLabel();

jLabel15 = new javax.swing.JLabel();

jLabel13 = new javax.swing.JLabel();

jLabel14 = new javax.swing.JLabel();

tf1 = new javax.swing.JTextField();

tf2 = new javax.swing.JTextField();

tf4 = new javax.swing.JTextField();

tf5 = new javax.swing.JTextField();

tf7 = new javax.swing.JTextField();

tf8 = new javax.swing.JTextField();

tf9 = new javax.swing.JTextField();

tf10 = new javax.swing.JTextField();

tf11 = new javax.swing.JTextField();

tf12 = new javax.swing.JTextField();

tf13 = new javax.swing.JTextField();

tf14 = new javax.swing.JTextField();

r1 = new javax.swing.JRadioButton();

r2 = new javax.swing.JRadioButton();

jLabel16 = new javax.swing.JLabel();

jLabel17 = new javax.swing.JLabel();

jScrollPane2 = new javax.swing.JScrollPane();

tf6 = new javax.swing.JTextArea();

c1 = new javax.swing.JCheckBox();

c2 = new javax.swing.JCheckBox();

c3 = new javax.swing.JCheckBox();
c4 = new javax.swing.JCheckBox();

c5 = new javax.swing.JCheckBox();

jLabel18 = new javax.swing.JLabel();

jLabel19 = new javax.swing.JLabel();

jLabel20 = new javax.swing.JLabel();

jLabel21 = new javax.swing.JLabel();

jLabel22 = new javax.swing.JLabel();

jLabel1 = new javax.swing.JLabel();

jLabel27 = new javax.swing.JLabel();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuItem8 = new javax.swing.JMenuItem();

jSeparator2 = new javax.swing.JPopupMenu.Separator();

jMenuItem9 = new javax.swing.JMenuItem();

jMenu2 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

jMenuItem6 = new javax.swing.JMenuItem();

jMenuItem7 = new javax.swing.JMenuItem();

jDialog1.addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

jDialog1WindowOpened(evt);

});

jPanel2.setBackground(new java.awt.Color(204, 0, 102));

jPanel6.setBackground(new java.awt.Color(0, 153, 204));

l2.setFont(new java.awt.Font("Arial", 3, 18)); // NOI18N

l2.setModel(new DefaultListModel());

l2.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

l2MouseClicked(evt);

public void mouseEntered(java.awt.event.MouseEvent evt) {

l2MouseEntered(evt);

});
jScrollPane4.setViewportView(l2);

jLabel24.setFont(new java.awt.Font("Times New Roman", 2, 12)); // NOI18N

jLabel24.setForeground(new java.awt.Color(255, 255, 255));

jLabel24.setText("Select one of the tables");

jLabel25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

jPanel6.setLayout(jPanel6Layout);

jPanel6Layout.setHorizontalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jLabel25))

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(40, 40, 40)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE)))

.addContainerGap())

.addGroup(jPanel6Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel6Layout.setVerticalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addComponent(jLabel25)

.addGap(29, 29, 29)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jLabel24)

.addContainerGap(59, Short.MAX_VALUE))

);

jButton5.setBackground(new java.awt.Color(0, 102, 255));

jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton5.setForeground(new java.awt.Color(255, 255, 255));

jButton5.setText("Show Records");

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {


jButton5ActionPerformed(evt);

});

jLabel26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Annotation 2019-05-21 091950.png"))); // NOI18N

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5))

.addGap(138, 138, 138))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 22, Short.MAX_VALUE))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(236, 236, 236)

.addComponent(jLabel26, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

addWindowListener(new java.awt.event.WindowAdapter() {
public void windowOpened(java.awt.event.WindowEvent evt) {

formWindowOpened(evt);

});

jPanel1.setBackground(new java.awt.Color(0, 153, 51));

jButton1.setText("Back");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

jLabel2.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel2.setText("Account No.");

jLabel3.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel3.setText("Name");

jLabel4.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel4.setText("Authentication Proof :");

jLabel5.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel5.setText("Father's Name");

jLabel6.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel6.setText("Mother's Name");

jLabel7.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel7.setText("Address");

jLabel8.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel8.setText("Aadhar Card");

jLabel9.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel9.setText("Pan Card");

jLabel10.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel10.setText("Voter Id Card");

jLabel11.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel11.setText("Driving Liences");
jLabel12.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel12.setText("Passport");

jLabel15.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel15.setText("Current Balance");

jLabel13.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel13.setText("Account Type ");

jLabel14.setFont(new java.awt.Font("Tempus Sans ITC", 3, 24)); // NOI18N

jLabel14.setText("Mobile No.");

tf1.setEditable(false);

tf1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf1ActionPerformed(evt);

});

tf2.setEditable(false);

tf2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf2ActionPerformed(evt);

});

tf4.setEditable(false);

tf4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf4ActionPerformed(evt);

});

tf5.setEditable(false);

tf5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf5ActionPerformed(evt);

});

tf7.setBackground(new java.awt.Color(204, 255, 255));

tf8.setEditable(false);

tf8.setBackground(new java.awt.Color(204, 255, 255));


tf8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf8ActionPerformed(evt);

});

tf9.setEditable(false);

tf9.setBackground(new java.awt.Color(204, 255, 255));

tf10.setEditable(false);

tf10.setBackground(new java.awt.Color(204, 255, 255));

tf10.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf10ActionPerformed(evt);

});

tf11.setEditable(false);

tf11.setBackground(new java.awt.Color(204, 255, 255));

tf12.setEditable(false);

tf12.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf12ActionPerformed(evt);

});

tf13.setEditable(false);

tf14.setEditable(false);

tf14.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

tf14ActionPerformed(evt);

});

buttonGroup1.add(r1);

r1.setText("Male");

buttonGroup1.add(r2);

r2.setText("Female");

jLabel16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/1.jpg"))); // NOI18N


jLabel17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/2.jpg"))); // NOI18N

tf6.setEditable(false);

tf6.setColumns(20);

tf6.setRows(5);

jScrollPane2.setViewportView(tf6);

c1.setSelected(true);

c1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c1ActionPerformed(evt);

});

c2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c2ActionPerformed(evt);

});

c3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c3ActionPerformed(evt);

});

c4.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c4ActionPerformed(evt);

});

c5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

c5ActionPerformed(evt);

});

jLabel18.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Aadhar.jpg"))); // NOI18N

jLabel19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Pan.jpg"))); // NOI18N

jLabel20.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Voter.jpg"))); // NOI18N


jLabel21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Driving.jpg"))); // NOI18N

jLabel22.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Passport.jpg"))); // NOI18N

jLabel1.setFont(new java.awt.Font("Algerian", 3, 36)); // NOI18N

jLabel1.setText("User full details");

jLabel27.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(224, 224, 224)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(tf14, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(359, 359, 359))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(437, 437, 437)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 433, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(142, 142, 142)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(30, 30, 30)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(42, 42, 42))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addComponent(jLabel2)

.addGap(73, 73, 73))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)


.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel13)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 244, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf5, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf4, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf13, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf12, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 330, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(177, 177, 177)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(586, 586, 586)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(41, 41, 41)

.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(67, 67, 67)

.addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(r1)

.addGap(49, 49, 49)

.addComponent(jLabel17)

.addGap(18, 18, 18)

.addComponent(r2))))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(586, 586, 586)

.addComponent(c1)

.addGap(6, 6, 6)

.addComponent(jLabel18)

.addGap(18, 18, 18)

.addComponent(tf7, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(220, 220, 220))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c5)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel12)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel22, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(tf11, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c3)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))))

.addGap(18, 18, 18)

.addComponent(tf9, javax.swing.GroupLayout.PREFERRED_SIZE, 232, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c4)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel11)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel21)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(tf10, javax.swing.GroupLayout.PREFERRED_SIZE, 233, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(c2)

.addGap(6, 6, 6)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(6, 6, 6)

.addComponent(tf8, javax.swing.GroupLayout.PREFERRED_SIZE, 239, javax.swing.GroupLayout.PREFERRED_SIZE))

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)))))

.addGap(241, 241, 241)))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(192, 192, 192)

.addComponent(jLabel14))
.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jButton1)

.addGap(390, 390, 390)

.addComponent(jLabel27)))

.addGap(318, 318, 318)))

.addContainerGap(790, Short.MAX_VALUE))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel27, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton1))

.addGap(18, 18, 18)

.addComponent(jLabel1)

.addGap(70, 70, 70)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel16))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(25, 25, 25)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(r2)

.addComponent(r1))))

.addGap(73, 73, 73)

.addComponent(jLabel4)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(77, 77, 77)

.addComponent(tf7, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(46, 46, 46)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(c1)

.addComponent(jLabel18))))

.addGap(2, 2, 2)

.addComponent(jLabel8)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(c3)

.addComponent(jLabel20, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(tf9, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(18, 18, 18)

.addComponent(jLabel10))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(tf1, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(22, 22, 22)

.addComponent(tf5, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(18, 18, 18)

.addComponent(jLabel6)))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf4, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(151, 151, 151)

.addComponent(jLabel7))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(26, 26, 26)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf13, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel13))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(tf12, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel15))

.addGap(18, 18, 18)

.addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(50, 50, 50)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel14)

.addComponent(tf14, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))))))

.addGap(11, 11, 11)


.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel22)

.addComponent(tf11, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel12))

.addComponent(c5))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(4, 4, 4)

.addComponent(c2))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(tf8, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel19, javax.swing.GroupLayout.PREFERRED_SIZE, 66, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel9)))

.addGap(42, 42, 42)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(c4))

.addComponent(jLabel21))

.addComponent(tf10, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel11)

.addContainerGap(511, Short.MAX_VALUE))

);

jScrollPane1.setViewportView(jPanel1);

jMenu1.setText("Actions");

jMenu1.add(jSeparator1);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem4.setText("New account");

jMenu1.add(jMenuItem4);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem3.setText("Update user data");

jMenu1.add(jMenuItem3);
jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem8.setText("Search full details");

jMenuItem8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem8ActionPerformed(evt);

});

jMenu1.add(jMenuItem8);

jMenu1.add(jSeparator2);

jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem9.setText("show all data");

jMenuItem9.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem9ActionPerformed(evt);

});

jMenu1.add(jMenuItem9);

jMenuBar1.add(jMenu1);

jMenu2.setText("Window");

jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem1.setText("Log Out");

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu2.add(jMenuItem1);

jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Home");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu2.add(jMenuItem2);

jMenuBar1.add(jMenu2);
jMenu3.setText("About");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem6.setText("How to use");

jMenu3.add(jMenuItem6);

jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem7.setText("Exit");

jMenu3.add(jMenuItem7);

jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 1200, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 715, Short.MAX_VALUE)

);

pack();

setLocationRelativeTo(null);

}// </editor-fold>

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void tf1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf4ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:

private void tf5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf10ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void tf14ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void c1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void c2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c2.isSelected())

tf8.setEditable(true);

else

tf8.setEditable(false);

private void c3ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c3.isSelected())

tf9.setEditable(true);

else

tf9.setEditable(false);

private void c4ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c4.isSelected())

tf10.setEditable(true);

else
tf10.setEditable(false);

private void c5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(c5.isSelected())

tf11.setEditable(true);

else

tf11.setEditable(false);

private void formWindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

tf1.setText(AccNo+"");

Object k,l,m,n,o,p,q,r,s,u,v,w,x,y;

k=tf1.getText();

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="select * from users where account_no='"+k+"';";

ResultSet rs=stmt.executeQuery(query);

while(rs.next()){

k=rs.getString(1);

l=rs.getString(2);

m=rs.getString(3);

n=rs.getString(4);

o=rs.getString(5);

p=rs.getString(6);

q=rs.getString(7);

r=rs.getString(8);

s=rs.getString(9);

u=rs.getString(10);

v=rs.getString(11);

w=rs.getFloat(12);

x=rs.getString(13);

y=rs.getString(14);

tf1.setText(k+"");

tf2.setText(l+"");
if(m.equals("M"))

r1.setSelected(true);

else if(m.equals("F"))

r2.setSelected(true);

tf4.setText(n+"");

tf5.setText(o+"");

tf6.setText(p+"");

tf7.setText(q+"");

tf8.setText(r+"");

tf9.setText(s+"");

tf10.setText(u+"");

tf11.setText(v+"");

tf12.setText(w+"");

tf13.setText(x+"");

tf14.setText(y+"");

rs.close();

stmt.close();

conn.close();

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jDialog1.setVisible(true);

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Login().setVisible(true);

this.setVisible(false);

}
private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void l2MouseClicked(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

String a=l2.getSelectedValue();

listvalue=a;

private void l2MouseEntered(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(l2.isSelectedIndex(1))

{ new tuser().setVisible(true);

this.setVisible(false);

jDialog1.dispose();

else if(l2.isSelectedIndex(0))

{new transaction().setVisible(true);

this.setVisible(false);

jDialog1.dispose();}

else JOptionPane.showMessageDialog(rootPane,"Please select one of the table.");

private void jDialog1WindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

DefaultListModel dlm2= (DefaultListModel) l2.getModel();

Object a;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="show tables;";

stmt.executeUpdate(query);

ResultSet rs=stmt.executeQuery(query);
dlm2.removeAllElements();

rs.absolute(2);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

rs.absolute(3);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

stmt.close();

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void tf12ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

/**

* @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(Edit1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Edit1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {


java.util.logging.Logger.getLogger(Edit1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Edit1.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

//</editor-fold>

//</editor-fold>

/* Create and display the form */

java.awt.EventQueue.invokeLater(new Runnable() {

public void run() {

new Edit1().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.ButtonGroup buttonGroup1;

private javax.swing.JCheckBox c1;

private javax.swing.JCheckBox c2;

private javax.swing.JCheckBox c3;

private javax.swing.JCheckBox c4;

private javax.swing.JCheckBox c5;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton5;

private javax.swing.JDialog jDialog1;

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 jLabel15;

private javax.swing.JLabel jLabel16;

private javax.swing.JLabel jLabel17;

private javax.swing.JLabel jLabel18;

private javax.swing.JLabel jLabel19;

private javax.swing.JLabel jLabel2;

private javax.swing.JLabel jLabel20;

private javax.swing.JLabel jLabel21;

private javax.swing.JLabel jLabel22;

private javax.swing.JLabel jLabel24;

private javax.swing.JLabel jLabel25;

private javax.swing.JLabel jLabel26;

private javax.swing.JLabel jLabel27;


private javax.swing.JLabel jLabel3;

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.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem6;

private javax.swing.JMenuItem jMenuItem7;

private javax.swing.JMenuItem jMenuItem8;

private javax.swing.JMenuItem jMenuItem9;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel6;

private javax.swing.JScrollPane jScrollPane1;

private javax.swing.JScrollPane jScrollPane2;

private javax.swing.JScrollPane jScrollPane4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JPopupMenu.Separator jSeparator2;

private javax.swing.JList<String> l2;

private javax.swing.JRadioButton r1;

private javax.swing.JRadioButton r2;

private javax.swing.JTextField tf1;

private javax.swing.JTextField tf10;

private javax.swing.JTextField tf11;

private javax.swing.JTextField tf12;

private javax.swing.JTextField tf13;

private javax.swing.JTextField tf14;

private javax.swing.JTextField tf2;

private javax.swing.JTextField tf4;

private javax.swing.JTextField tf5;

private javax.swing.JTextArea tf6;

private javax.swing.JTextField tf7;

private javax.swing.JTextField tf8;

private javax.swing.JTextField tf9;

// End of variables declaration


}

Debit

/*

* 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 school.project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import static school.project.User_database_info.Database;

import static school.project.User_database_info.AccNo;

import javax.swing.DefaultListModel;

import static school.project.User_database_info.listvalue;

/**

* @author Yogesh Kumar Sahoo

*/

public class Dabit extends javax.swing.JFrame {

/**

* Creates new form Dabit

*/

public Dabit() {

initComponents();

/**

* 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() {

jDialog1 = new javax.swing.JDialog();


jPanel2 = new javax.swing.JPanel();

jPanel6 = new javax.swing.JPanel();

jScrollPane4 = new javax.swing.JScrollPane();

l2 = new javax.swing.JList<>();

jLabel6 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jButton5 = new javax.swing.JButton();

jLabel9 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

jLabel2 = new javax.swing.JLabel();

acc = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

name = new javax.swing.JTextField();

jLabel4 = new javax.swing.JLabel();

a1 = new javax.swing.JTextField();

jLabel5 = new javax.swing.JLabel();

crbal = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jLabel7 = new javax.swing.JLabel();

jLabel1 = new javax.swing.JLabel();

jButton2 = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuItem8 = new javax.swing.JMenuItem();

jSeparator2 = new javax.swing.JPopupMenu.Separator();

jMenuItem9 = new javax.swing.JMenuItem();

jMenu2 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

jMenuItem6 = new javax.swing.JMenuItem();

jMenuItem7 = new javax.swing.JMenuItem();

jDialog1.addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

jDialog1WindowOpened(evt);

});

jPanel2.setBackground(new java.awt.Color(204, 0, 102));


jPanel6.setBackground(new java.awt.Color(0, 153, 204));

l2.setFont(new java.awt.Font("Arial", 3, 18)); // NOI18N

l2.setModel(new DefaultListModel());

l2.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

l2MouseClicked(evt);

public void mouseEntered(java.awt.event.MouseEvent evt) {

l2MouseEntered(evt);

});

jScrollPane4.setViewportView(l2);

jLabel6.setFont(new java.awt.Font("Times New Roman", 2, 12)); // NOI18N

jLabel6.setForeground(new java.awt.Color(255, 255, 255));

jLabel6.setText("Select one of the tables");

jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

jPanel6.setLayout(jPanel6Layout);

jPanel6Layout.setHorizontalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jLabel8))

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(40, 40, 40)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE)))

.addContainerGap())

.addGroup(jPanel6Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel6Layout.setVerticalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addComponent(jLabel8)

.addGap(29, 29, 29)


.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jLabel6)

.addContainerGap(59, Short.MAX_VALUE))

);

jButton5.setBackground(new java.awt.Color(0, 102, 255));

jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton5.setForeground(new java.awt.Color(255, 255, 255));

jButton5.setText("Show Records");

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

});

jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Annotation 2019-05-21 091950.png"))); // NOI18N

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5))

.addGap(138, 138, 138))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 22, Short.MAX_VALUE))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(236, 236, 236)

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());


jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

formWindowOpened(evt);

});

jPanel1.setBackground(new java.awt.Color(255, 153, 102));

jLabel2.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel2.setText("Account No.");

acc.setEditable(false);

jLabel3.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel3.setText("Name");

name.setEditable(false);

jLabel4.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel4.setText("Amount :");

jLabel5.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel5.setText("Current Balance");

crbal.setEditable(false);

crbal.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

crbalActionPerformed(evt);

});

jButton1.setText("Debit Ammount");

jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

jLabel1.setFont(new java.awt.Font("Tahoma", 3, 30)); // NOI18N

jLabel1.setText("Money You Debit");

jButton2.setText("Back");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jButton2)

.addGap(397, 397, 397)

.addComponent(jLabel7))

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(59, 59, 59)

.addComponent(jLabel2))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(acc, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()

.addGap(37, 37, 37)

.addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(294, 294, 294))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addGap(219, 219, 219)

.addComponent(crbal, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)))))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(173, 173, 173)

.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(a1, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(151, 151, 151)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(191, 191, 191)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 446, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addContainerGap(236, Short.MAX_VALUE))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton2))

.addGap(29, 29, 29)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(29, 29, 29)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(acc, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3))

.addGap(18, 18, 18)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(crbal, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel5))

.addGap(79, 79, 79)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(a1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel4)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))

.addContainerGap(190, Short.MAX_VALUE))
);

jMenu1.setText("Actions");

jMenu1.add(jSeparator1);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem4.setText("New account");

jMenu1.add(jMenuItem4);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem3.setText("Update user data");

jMenu1.add(jMenuItem3);

jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem8.setText("Search full details");

jMenuItem8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem8ActionPerformed(evt);

});

jMenu1.add(jMenuItem8);

jMenu1.add(jSeparator2);

jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem9.setText("show all data");

jMenuItem9.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem9ActionPerformed(evt);

});

jMenu1.add(jMenuItem9);

jMenuBar1.add(jMenu1);

jMenu2.setText("Window");

jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem1.setText("Log Out");

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu2.add(jMenuItem1);
jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Home");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu2.add(jMenuItem2);

jMenuBar1.add(jMenu2);

jMenu3.setText("About");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem6.setText("How to use");

jMenu3.add(jMenuItem6);

jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem7.setText("Exit");

jMenu3.add(jMenuItem7);

jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

pack();

setLocationRelativeTo(null);

}// </editor-fold>

private void crbalActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

}
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TOD,O add your handling code here:

float l,w = 0,r;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stm=conn.createStatement();

String query;

query="select * from users where account_no='"+acc.getText()+"';";

ResultSet rs=stm.executeQuery(query);

while(rs.next()){

w=rs.getFloat(12);

l=Float.parseFloat(a1.getText());

r=w-l;

Statement stmt=conn.createStatement();

String sql;

sql="update users set current_bal="+r+" where account_no="+acc.getText()+";";

stmt.executeUpdate(sql);

JOptionPane.showMessageDialog(null,"Amount Successfully Debited");

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

Object a,b = null,c = null,e = null,d = null;

a=acc.getText();

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement st=con.createStatement();

String query;

query="Select * from users where Account_No="+a+";";

ResultSet rs=st.executeQuery(query);

while(rs.next())

{ b=rs.getString(2);

c=rs.getFloat(12);
d=rs.getString(13);

e=rs.getString(3);

name.setText(b+"");

crbal.setText(c+"");

catch(Exception z){

JOptionPane.showMessageDialog(rootPane, z);

private void formWindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

acc.setText(AccNo);

Object a,b = null,c = null,e = null,d = null;

a=acc.getText();

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement st=con.createStatement();

String query;

query="Select * from users where Account_No="+a+";";

ResultSet rs=st.executeQuery(query);

while(rs.next())

{ b=rs.getString(2);

c=rs.getFloat(12);

d=rs.getString(13);

e=rs.getString(3);

name.setText(b+"");

crbal.setText(c+"");

catch(Exception z){

JOptionPane.showMessageDialog(rootPane, z);

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:

jDialog1.setVisible(true);

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Login().setVisible(true);

this.setVisible(false);

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void l2MouseClicked(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

String a=l2.getSelectedValue();

listvalue=a;

private void l2MouseEntered(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(l2.isSelectedIndex(1))

{ new tuser().setVisible(true);

this.setVisible(false);

jDialog1.dispose();

else if(l2.isSelectedIndex(0))

{new transaction().setVisible(true);

this.setVisible(false);

jDialog1.dispose();}

else JOptionPane.showMessageDialog(rootPane,"Please select one of the table.");

private void jDialog1WindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

DefaultListModel dlm2= (DefaultListModel) l2.getModel();


Object a;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="show tables;";

stmt.executeUpdate(query);

ResultSet rs=stmt.executeQuery(query);

dlm2.removeAllElements();

rs.absolute(2);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

rs.absolute(3);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

stmt.close();

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

/**

* @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(Dabit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Dabit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Dabit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Dabit.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 Dabit().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JTextField a1;

private javax.swing.JTextField acc;

private javax.swing.JTextField crbal;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton5;

private javax.swing.JDialog jDialog1;

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.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JMenu jMenu1;


private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem6;

private javax.swing.JMenuItem jMenuItem7;

private javax.swing.JMenuItem jMenuItem8;

private javax.swing.JMenuItem jMenuItem9;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel6;

private javax.swing.JScrollPane jScrollPane4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JPopupMenu.Separator jSeparator2;

private javax.swing.JList<String> l2;

private javax.swing.JTextField name;

// End of variables declaration

Credit

/*

* 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 school.project;

import java.sql.*;

import javax.swing.JOptionPane;

import static school.project.User_database_info.Database;

import static school.project.User_database_info.AccNo;

import javax.swing.DefaultListModel;

import static school.project.User_database_info.listvalue;

/**

* @author Yogesh Kumar Sahoo

*/

public class Credit extends javax.swing.JFrame {

/**

* Creates new form Credit


*/

public Credit() {

initComponents();

/**

* 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() {

jDialog1 = new javax.swing.JDialog();

jPanel2 = new javax.swing.JPanel();

jPanel6 = new javax.swing.JPanel();

jScrollPane4 = new javax.swing.JScrollPane();

l2 = new javax.swing.JList<>();

jLabel6 = new javax.swing.JLabel();

jLabel8 = new javax.swing.JLabel();

jButton5 = new javax.swing.JButton();

jLabel9 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

jLabel2 = new javax.swing.JLabel();

acc = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

name = new javax.swing.JTextField();

jLabel4 = new javax.swing.JLabel();

a1 = new javax.swing.JTextField();

jLabel5 = new javax.swing.JLabel();

crbal = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jLabel7 = new javax.swing.JLabel();

jLabel1 = new javax.swing.JLabel();

jButton2 = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuItem8 = new javax.swing.JMenuItem();

jSeparator2 = new javax.swing.JPopupMenu.Separator();

jMenuItem9 = new javax.swing.JMenuItem();


jMenu2 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

jMenuItem6 = new javax.swing.JMenuItem();

jMenuItem7 = new javax.swing.JMenuItem();

jDialog1.addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

jDialog1WindowOpened(evt);

});

jPanel2.setBackground(new java.awt.Color(204, 0, 102));

jPanel6.setBackground(new java.awt.Color(0, 153, 204));

l2.setFont(new java.awt.Font("Arial", 3, 18)); // NOI18N

l2.setModel(new DefaultListModel());

l2.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

l2MouseClicked(evt);

public void mouseEntered(java.awt.event.MouseEvent evt) {

l2MouseEntered(evt);

});

jScrollPane4.setViewportView(l2);

jLabel6.setFont(new java.awt.Font("Times New Roman", 2, 12)); // NOI18N

jLabel6.setForeground(new java.awt.Color(255, 255, 255));

jLabel6.setText("Select one of the tables");

jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

jPanel6.setLayout(jPanel6Layout);

jPanel6Layout.setHorizontalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jLabel8))
.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(40, 40, 40)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE)))

.addContainerGap())

.addGroup(jPanel6Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel6Layout.setVerticalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addComponent(jLabel8)

.addGap(29, 29, 29)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jLabel6)

.addContainerGap(59, Short.MAX_VALUE))

);

jButton5.setBackground(new java.awt.Color(0, 102, 255));

jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton5.setForeground(new java.awt.Color(255, 255, 255));

jButton5.setText("Show Records");

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

});

jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Annotation 2019-05-21 091950.png"))); // NOI18N

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5))

.addGap(138, 138, 138))


);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 22, Short.MAX_VALUE))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(236, 236, 236)

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

formWindowOpened(evt);

});

jPanel1.setBackground(new java.awt.Color(0, 102, 204));

jLabel2.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel2.setText("Account No.");

acc.setEditable(false);

jLabel3.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel3.setText("Name");

name.setEditable(false);
jLabel4.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel4.setText("Amount :");

jLabel5.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel5.setText("Current Balance");

crbal.setEditable(false);

crbal.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

crbalActionPerformed(evt);

});

jButton1.setText("Credit Amount");

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

jLabel1.setFont(new java.awt.Font("Tahoma", 3, 30)); // NOI18N

jLabel1.setText("Money You Credit ");

jButton2.setText("Back");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jButton2)

.addGap(397, 397, 397)

.addComponent(jLabel7)

.addContainerGap(362, Short.MAX_VALUE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(69, 69, 69)


.addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(38, 38, 38)

.addComponent(crbal, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(50, 50, 50)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(jLabel2)

.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(46, 46, 46)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(acc, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGap(494, 494, 494))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 446, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(a1, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(157, 157, 157)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 223, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGap(0, 0, Short.MAX_VALUE))))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(23, 23, 23)

.addComponent(jButton2)))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 78, Short.MAX_VALUE)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(44, 44, 44)


.addComponent(jLabel2))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(35, 35, 35)

.addComponent(acc, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(27, 27, 27)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel3)

.addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(11, 11, 11)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel5)

.addComponent(crbal, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 76, Short.MAX_VALUE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)

.addComponent(jLabel4)

.addComponent(a1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(102, 102, 102))

);

jMenu1.setText("Actions");

jMenu1.add(jSeparator1);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem4.setText("New account");

jMenu1.add(jMenuItem4);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem3.setText("Update user data");

jMenu1.add(jMenuItem3);

jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem8.setText("Search full details");

jMenuItem8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem8ActionPerformed(evt);

});

jMenu1.add(jMenuItem8);

jMenu1.add(jSeparator2);

jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem9.setText("show all data");

jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem9ActionPerformed(evt);

});

jMenu1.add(jMenuItem9);

jMenuBar1.add(jMenu1);

jMenu2.setText("Window");

jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem1.setText("Log Out");

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu2.add(jMenuItem1);

jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Home");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu2.add(jMenuItem2);

jMenuBar1.add(jMenu2);

jMenu3.setText("About");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem6.setText("How to use");

jMenu3.add(jMenuItem6);

jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem7.setText("Exit");

jMenu3.add(jMenuItem7);

jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);

layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

pack();

}// </editor-fold>

private void crbalActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TOD,O add your handling code here:

float l,w = 0,r;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stm=conn.createStatement();

String query;

query="select * from users where account_no='"+acc.getText()+"';";

ResultSet rs=stm.executeQuery(query);

while(rs.next()){

w=rs.getFloat(12);

l=Float.parseFloat(a1.getText());

r=w+l;

Statement stmt=conn.createStatement();

String sql;

sql="update users set current_bal="+r+" where account_no="+acc.getText()+";";

stmt.executeUpdate(sql);

JOptionPane.showMessageDialog(null,"Amount Successfully Debited");

}
catch(Exception z)

JOptionPane.showMessageDialog(null,z);

Object a,b = null,c = null,e = null,d = null;

a=acc.getText();

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement st=con.createStatement();

String query;

query="Select * from users where Account_No="+a+";";

ResultSet rs=st.executeQuery(query);

while(rs.next())

{ b=rs.getString(2);

c=rs.getFloat(12);

d=rs.getString(13);

e=rs.getString(3);

name.setText(b+"");

crbal.setText(c+"");

catch(Exception z){

JOptionPane.showMessageDialog(rootPane, z);

private void formWindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

acc.setText(AccNo);

Object a,b = null,c = null,e = null,d = null;

a=acc.getText();

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement st=con.createStatement();

String query;

query="Select * from users where Account_No="+a+";";

ResultSet rs=st.executeQuery(query);

while(rs.next())

{ b=rs.getString(2);

c=rs.getFloat(12);
d=rs.getString(13);

e=rs.getString(3);

name.setText(b+"");

crbal.setText(c+"");

catch(Exception z){

JOptionPane.showMessageDialog(rootPane, z);

private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jDialog1.setVisible(true);

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Login().setVisible(true);

this.setVisible(false);

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void l2MouseClicked(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

String a=l2.getSelectedValue();

listvalue=a;

private void l2MouseEntered(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {


// TODO add your handling code here:

if(l2.isSelectedIndex(1))

{ new tuser().setVisible(true);

this.setVisible(false);

jDialog1.dispose();

else if(l2.isSelectedIndex(0))

{new transaction().setVisible(true);

this.setVisible(false);

jDialog1.dispose();}

else JOptionPane.showMessageDialog(rootPane,"Please select one of the table.");

private void jDialog1WindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

DefaultListModel dlm2= (DefaultListModel) l2.getModel();

Object a;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="show tables;";

stmt.executeUpdate(query);

ResultSet rs=stmt.executeQuery(query);

dlm2.removeAllElements();

rs.absolute(2);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

rs.absolute(3);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

stmt.close();

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

}
}

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

/**

* @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(Credit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Credit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Credit.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Credit.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 Credit().setVisible(true);

});

// Variables declaration - do not modify


private javax.swing.JTextField a1;

private javax.swing.JTextField acc;

private javax.swing.JTextField crbal;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton5;

private javax.swing.JDialog jDialog1;

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.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem6;

private javax.swing.JMenuItem jMenuItem7;

private javax.swing.JMenuItem jMenuItem8;

private javax.swing.JMenuItem jMenuItem9;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel6;

private javax.swing.JScrollPane jScrollPane4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JPopupMenu.Separator jSeparator2;

private javax.swing.JList<String> l2;

private javax.swing.JTextField name;

// End of variables declaration

Trans

/*
* 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 school.project;

import java.sql.Connection;

import java.sql.DriverManager;

import java.sql.ResultSet;

import java.sql.Statement;

import javax.swing.JOptionPane;

import static school.project.User_database_info.Database;

import javax.swing.DefaultListModel;

import static school.project.User_database_info.listvalue;

import static school.project.User_database_info.AccNo;

/**

* @author Yogesh Kumar Sahoo

*/

public class Trans extends javax.swing.JFrame {

/**

* Creates new form Trans

*/

public Trans() {

initComponents();

/**

* 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() {

jDialog1 = new javax.swing.JDialog();

jPanel2 = new javax.swing.JPanel();

jPanel6 = new javax.swing.JPanel();

jScrollPane4 = new javax.swing.JScrollPane();

l2 = new javax.swing.JList<>();

jLabel9 = new javax.swing.JLabel();

jLabel11 = new javax.swing.JLabel();


jButton5 = new javax.swing.JButton();

jLabel14 = new javax.swing.JLabel();

jPanel1 = new javax.swing.JPanel();

jLabel2 = new javax.swing.JLabel();

acc = new javax.swing.JTextField();

jLabel3 = new javax.swing.JLabel();

name = new javax.swing.JTextField();

jLabel5 = new javax.swing.JLabel();

crbal = new javax.swing.JTextField();

jLabel4 = new javax.swing.JLabel();

acc1 = new javax.swing.JTextField();

jLabel6 = new javax.swing.JLabel();

name1 = new javax.swing.JTextField();

jLabel8 = new javax.swing.JLabel();

a2 = new javax.swing.JTextField();

jLabel10 = new javax.swing.JLabel();

ifsc = new javax.swing.JTextField();

jLabel12 = new javax.swing.JLabel();

transid = new javax.swing.JTextField();

jButton1 = new javax.swing.JButton();

jButton2 = new javax.swing.JButton();

jLabel7 = new javax.swing.JLabel();

jLabel1 = new javax.swing.JLabel();

jButton3 = new javax.swing.JButton();

jMenuBar1 = new javax.swing.JMenuBar();

jMenu1 = new javax.swing.JMenu();

jSeparator1 = new javax.swing.JPopupMenu.Separator();

jMenuItem4 = new javax.swing.JMenuItem();

jMenuItem3 = new javax.swing.JMenuItem();

jMenuItem8 = new javax.swing.JMenuItem();

jSeparator2 = new javax.swing.JPopupMenu.Separator();

jMenuItem9 = new javax.swing.JMenuItem();

jMenu2 = new javax.swing.JMenu();

jMenuItem1 = new javax.swing.JMenuItem();

jMenuItem2 = new javax.swing.JMenuItem();

jMenu3 = new javax.swing.JMenu();

jMenuItem6 = new javax.swing.JMenuItem();

jMenuItem7 = new javax.swing.JMenuItem();

jDialog1.addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

jDialog1WindowOpened(evt);

});
jPanel2.setBackground(new java.awt.Color(204, 0, 102));

jPanel6.setBackground(new java.awt.Color(0, 153, 204));

l2.setFont(new java.awt.Font("Arial", 3, 18)); // NOI18N

l2.setModel(new DefaultListModel());

l2.addMouseListener(new java.awt.event.MouseAdapter() {

public void mouseClicked(java.awt.event.MouseEvent evt) {

l2MouseClicked(evt);

public void mouseEntered(java.awt.event.MouseEvent evt) {

l2MouseEntered(evt);

});

jScrollPane4.setViewportView(l2);

jLabel9.setFont(new java.awt.Font("Times New Roman", 2, 12)); // NOI18N

jLabel9.setForeground(new java.awt.Color(255, 255, 255));

jLabel9.setText("Select one of the tables");

jLabel11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);

jPanel6.setLayout(jPanel6Layout);

jPanel6Layout.setHorizontalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(0, 0, Short.MAX_VALUE)

.addComponent(jLabel11))

.addGroup(jPanel6Layout.createSequentialGroup()

.addGap(40, 40, 40)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE)))

.addContainerGap())

.addGroup(jPanel6Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))

);

jPanel6Layout.setVerticalGroup(

jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel6Layout.createSequentialGroup()

.addComponent(jLabel11)

.addGap(29, 29, 29)

.addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 410, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jLabel9)

.addContainerGap(59, Short.MAX_VALUE))

);

jButton5.setBackground(new java.awt.Color(0, 102, 255));

jButton5.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N

jButton5.setForeground(new java.awt.Color(255, 255, 255));

jButton5.setText("Show Records");

jButton5.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton5ActionPerformed(evt);

});

jLabel14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Annotation 2019-05-21 091950.png"))); // NOI18N

javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);

jPanel2.setLayout(jPanel2Layout);

jPanel2Layout.setHorizontalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 381, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 153, Short.MAX_VALUE)

.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton5))

.addGap(138, 138, 138))

);

jPanel2Layout.setVerticalGroup(

jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel2Layout.createSequentialGroup()

.addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 22, Short.MAX_VALUE))

.addGroup(jPanel2Layout.createSequentialGroup()

.addGap(236, 236, 236)

.addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 71, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(18, 18, 18)

.addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)

.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);

javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());

jDialog1.getContentPane().setLayout(jDialog1Layout);

jDialog1Layout.setHorizontalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

jDialog1Layout.setVerticalGroup(

jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

addWindowListener(new java.awt.event.WindowAdapter() {

public void windowOpened(java.awt.event.WindowEvent evt) {

formWindowOpened(evt);

});

jPanel1.setBackground(new java.awt.Color(0, 204, 102));

jLabel2.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel2.setText("Sender's Account No.");

acc.setEditable(false);

jLabel3.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel3.setText("Sender's Name");

name.setEditable(false);

jLabel5.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel5.setText("Current Balance");

crbal.setEditable(false);

crbal.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

crbalActionPerformed(evt);

});

jLabel4.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel4.setText("Receiver's Account No.");


jLabel6.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel6.setText("Receiver's Name");

jLabel8.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel8.setText("Amount :");

jLabel10.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel10.setText("IFSC code:");

jLabel12.setFont(new java.awt.Font("Andalus", 3, 24)); // NOI18N

jLabel12.setText("Transaction ID:");

jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/7.jpg"))); // NOI18N

jButton1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(204, 204, 204), new java.awt.Color(204, 204, 204),
new java.awt.Color(153, 153, 153), new java.awt.Color(153, 153, 153)));

jButton1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton1ActionPerformed(evt);

});

jButton2.setText("GO");

jButton2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton2ActionPerformed(evt);

});

jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Logo2.jpg"))); // NOI18N

jLabel1.setFont(new java.awt.Font("Tahoma", 3, 30)); // NOI18N

jLabel1.setText("Money Transfer");

jButton3.setText("Back");

jButton3.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jButton3ActionPerformed(evt);

});

javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);

jPanel1.setLayout(jPanel1Layout);

jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 446, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(0, 0, Short.MAX_VALUE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(20, 20, 20)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)

.addComponent(transid)

.addComponent(jLabel5, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 190,


javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(acc, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(name, javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(crbal, javax.swing.GroupLayout.PREFERRED_SIZE, 265, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 244,


javax.swing.GroupLayout.PREFERRED_SIZE))

.addGap(58, 58, 58)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(a2, javax.swing.GroupLayout.PREFERRED_SIZE, 241, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(77, 77, 77))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(128, 128, 128)))

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)

.addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

.addComponent(acc1)

.addComponent(name1)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 234, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jButton2))

.addComponent(ifsc, javax.swing.GroupLayout.PREFERRED_SIZE, 285, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addContainerGap()

.addComponent(jButton3)

.addGap(334, 334, 334)


.addComponent(jLabel7)))

.addContainerGap(136, Short.MAX_VALUE))

);

jPanel1Layout.setVerticalGroup(

jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addGap(19, 19, 19)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE)

.addComponent(jButton3))

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(67, 67, 67)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel12)

.addGap(5, 5, 5)

.addComponent(transid, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(69, 69, 69)

.addComponent(acc, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(27, 27, 27)

.addComponent(jLabel3)

.addGap(5, 5, 5)

.addComponent(name, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))

.addGroup(jPanel1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)

.addComponent(jLabel2)

.addGap(188, 188, 188)

.addComponent(jLabel5)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(crbal, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(36, 36, 36)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jLabel8)

.addComponent(a2, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)))

.addGroup(jPanel1Layout.createSequentialGroup()

.addComponent(jLabel4)

.addGap(18, 18, 18)

.addComponent(acc1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()

.addGap(27, 27, 27)

.addComponent(jLabel6))

.addGroup(jPanel1Layout.createSequentialGroup()

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jButton2)))

.addGap(5, 5, 5)

.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addComponent(name1, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)

.addGap(106, 106, 106))

.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()

.addComponent(jLabel10)

.addGap(5, 5, 5)

.addComponent(ifsc, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)))))

.addGap(158, 158, 158))

);

jMenu1.setText("Actions");

jMenu1.add(jSeparator1);

jMenuItem4.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_N, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem4.setText("New account");

jMenu1.add(jMenuItem4);

jMenuItem3.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem3.setText("Update user data");

jMenu1.add(jMenuItem3);

jMenuItem8.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem8.setText("Search full details");

jMenuItem8.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem8ActionPerformed(evt);

});

jMenu1.add(jMenuItem8);

jMenu1.add(jSeparator2);

jMenuItem9.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_D, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem9.setText("show all data");

jMenuItem9.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem9ActionPerformed(evt);
}

});

jMenu1.add(jMenuItem9);

jMenuBar1.add(jMenu1);

jMenu2.setText("Window");

jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_Q, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem1.setText("Log Out");

jMenuItem1.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem1ActionPerformed(evt);

});

jMenu2.add(jMenuItem1);

jMenuItem2.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem2.setText("Home");

jMenuItem2.addActionListener(new java.awt.event.ActionListener() {

public void actionPerformed(java.awt.event.ActionEvent evt) {

jMenuItem2ActionPerformed(evt);

});

jMenu2.add(jMenuItem2);

jMenuBar1.add(jMenu2);

jMenu3.setText("About");

jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_H, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem6.setText("How to use");

jMenu3.add(jMenuItem6);

jMenuItem7.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));

jMenuItem7.setText("Exit");

jMenu3.add(jMenuItem7);

jMenuBar1.add(jMenu3);

setJMenuBar(jMenuBar1);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());

getContentPane().setLayout(layout);
layout.setHorizontalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,


Short.MAX_VALUE)

);

layout.setVerticalGroup(

layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)

);

pack();

setLocationRelativeTo(null);

}// </editor-fold>

private void crbalActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

Object a,b,c,d,e,f,h;

float g,i,j,k,l = 0;

a=Integer.parseInt(transid.getText());

b=ifsc.getText();

c=name.getText();

d=acc.getText();

e=name1.getText();

f=acc1.getText();

g=Float.parseFloat(a2.getText());

h="transfered";

i=Float.parseFloat(crbal.getText());

j=i-g;

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement st=con.createStatement();

String query;

query="Select * from users where Account_No="+a+";";

ResultSet rs=st.executeQuery(query);

while(rs.next())

l=rs.getFloat(12);
}

catch(Exception z){

JOptionPane.showMessageDialog(rootPane, z);

k=g+l;

try{

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String sql,sql1,sql2;

sql="Insert into transactions values("+a+",'"+b+"','"+c+"','"+d+"','"+e+"','"+f+"',"+g+",'"+h+"');";

stmt.executeUpdate(sql);

JOptionPane.showMessageDialog(null,"Amount has been Transfered");

Statement stm=conn.createStatement();

sql1="update users set current_bal="+j+"where account_no="+acc.getText()+";";

stm.executeUpdate(sql1);

Statement st=conn.createStatement();

sql2="update users set current_bal="+k+"where account_no="+acc1.getText()+";";

st.executeUpdate(sql2);

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void formWindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here0:

acc.setText(AccNo);

Object a,b = null,c = null,e = null,d = null;

a=acc.getText();
try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement st=con.createStatement();

String query;

query="Select * from users where Account_No="+a+";";

ResultSet rs=st.executeQuery(query);

while(rs.next())

{ b=rs.getString(2);

c=rs.getFloat(12);

d=rs.getString(13);

e=rs.getString(3);

name.setText(b+"");

crbal.setText(c+"");

catch(Exception z){

JOptionPane.showMessageDialog(rootPane, z);

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

Object a,b = null;

a=acc1.getText();

try{

Class.forName("com.mysql.jdbc.Driver");

Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/bank","root","");

Statement st=con.createStatement();

String query;

query="Select * from users where Account_No="+a+";";

ResultSet rs=st.executeQuery(query);

while(rs.next())

{ b=rs.getString(2);

name1.setText(b+"");

catch(Exception z){

JOptionPane.showMessageDialog(rootPane, z);

}
private void jMenuItem8ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

private void jMenuItem9ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

jDialog1.setVisible(true);

private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Login().setVisible(true);

this.setVisible(false);

private void jMenuItem2ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

private void l2MouseClicked(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

String a=l2.getSelectedValue();

listvalue=a;

private void l2MouseEntered(java.awt.event.MouseEvent evt) {

// TODO add your handling code here:

private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

if(l2.isSelectedIndex(1))

{ new tuser().setVisible(true);

this.setVisible(false);

jDialog1.dispose();

else if(l2.isSelectedIndex(0))

{new transaction().setVisible(true);

this.setVisible(false);

jDialog1.dispose();}

else JOptionPane.showMessageDialog(rootPane,"Please select one of the table.");


}

private void jDialog1WindowOpened(java.awt.event.WindowEvent evt) {

// TODO add your handling code here:

DefaultListModel dlm2= (DefaultListModel) l2.getModel();

Object a;

try

Class.forName("java.sql.Driver");

Connection conn=DriverManager.getConnection("jdbc:mysql://localhost:3306/"+Database+"","root","");

Statement stmt=conn.createStatement();

String query;

query="show tables;";

stmt.executeUpdate(query);

ResultSet rs=stmt.executeQuery(query);

dlm2.removeAllElements();

rs.absolute(2);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

rs.absolute(3);

a=rs.getString(1);

dlm2.addElement(a);

l2.setModel(dlm2);

stmt.close();

catch(Exception z)

JOptionPane.showMessageDialog(null,z);

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {

// TODO add your handling code here:

new Home().setVisible(true);

this.setVisible(false);

/**

* @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(Trans.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Trans.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (IllegalAccessException ex) {

java.util.logging.Logger.getLogger(Trans.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);

} catch (javax.swing.UnsupportedLookAndFeelException ex) {

java.util.logging.Logger.getLogger(Trans.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 Trans().setVisible(true);

});

// Variables declaration - do not modify

private javax.swing.JTextField a2;

private javax.swing.JTextField acc;

private javax.swing.JTextField acc1;

private javax.swing.JTextField crbal;

private javax.swing.JTextField ifsc;

private javax.swing.JButton jButton1;

private javax.swing.JButton jButton2;

private javax.swing.JButton jButton3;

private javax.swing.JButton jButton5;

private javax.swing.JDialog jDialog1;

private javax.swing.JLabel jLabel1;


private javax.swing.JLabel jLabel10;

private javax.swing.JLabel jLabel11;

private javax.swing.JLabel jLabel12;

private javax.swing.JLabel jLabel14;

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.JLabel jLabel7;

private javax.swing.JLabel jLabel8;

private javax.swing.JLabel jLabel9;

private javax.swing.JMenu jMenu1;

private javax.swing.JMenu jMenu2;

private javax.swing.JMenu jMenu3;

private javax.swing.JMenuBar jMenuBar1;

private javax.swing.JMenuItem jMenuItem1;

private javax.swing.JMenuItem jMenuItem2;

private javax.swing.JMenuItem jMenuItem3;

private javax.swing.JMenuItem jMenuItem4;

private javax.swing.JMenuItem jMenuItem6;

private javax.swing.JMenuItem jMenuItem7;

private javax.swing.JMenuItem jMenuItem8;

private javax.swing.JMenuItem jMenuItem9;

private javax.swing.JPanel jPanel1;

private javax.swing.JPanel jPanel2;

private javax.swing.JPanel jPanel6;

private javax.swing.JScrollPane jScrollPane4;

private javax.swing.JPopupMenu.Separator jSeparator1;

private javax.swing.JPopupMenu.Separator jSeparator2;

private javax.swing.JList<String> l2;

private javax.swing.JTextField name;

private javax.swing.JTextField name1;

private javax.swing.JTextField transid;

// End of variables declaration

You might also like