├── nbproject ├── private │ ├── config.properties │ ├── private.properties │ └── private.xml ├── genfiles.properties ├── project.xml └── project.properties ├── t.jpg ├── src ├── t.jpg ├── child │ ├── t.jpg │ ├── SelectChildData.java │ └── SelectChildData.form ├── orphange │ ├── t.jpg │ └── Orphange.java ├── Data.java ├── Update.form ├── ShowData.form ├── Update.java ├── SelectStaff.form ├── SignUpPage.form ├── SelectStaff.java ├── ChildDetails.form ├── ShowData.java ├── LinkForm.form ├── ParentForm.form ├── ParentForm.java ├── LoginForm.form ├── LinkForm.java ├── LoginForm.java ├── SignUpPage.java ├── DonationForm.form ├── ChildDetails.java ├── StaffForm.form ├── DonationForm.java ├── ChildForm.form └── ChildForm.java ├── test └── t.jpg ├── manifest.mf └── README.md /nbproject/private/config.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jishanshaikh4/management-platform/HEAD/t.jpg -------------------------------------------------------------------------------- /src/t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jishanshaikh4/management-platform/HEAD/src/t.jpg -------------------------------------------------------------------------------- /test/t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jishanshaikh4/management-platform/HEAD/test/t.jpg -------------------------------------------------------------------------------- /src/child/t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jishanshaikh4/management-platform/HEAD/src/child/t.jpg -------------------------------------------------------------------------------- /manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | X-COMMENT: Main-Class will be added automatically by build 3 | 4 | -------------------------------------------------------------------------------- /src/orphange/t.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jishanshaikh4/management-platform/HEAD/src/orphange/t.jpg -------------------------------------------------------------------------------- /nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | do.depend=false 3 | do.jar=true 4 | javac.debug=true 5 | javadoc.preview=true 6 | user.properties.file=C:\\Users\\Muska\\AppData\\Roaming\\NetBeans\\8.1\\build.properties 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Management Platform 2 | 3 | [![Code Quality](https://www.codefactor.io/Content/badges/APlus.svg)](https://www.codefactor.io/repository/github/jishanshaikh4/management-platform/issues/main) 4 | 5 | Data management and accessibility platform (e.g. an orphanage) based on Java. 6 | -------------------------------------------------------------------------------- /nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=179840ab 2 | build.xml.script.CRC32=7295fd03 3 | build.xml.stylesheet.CRC32=8064a381@1.79.1.48 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=179840ab 7 | nbproject/build-impl.xml.script.CRC32=70070750 8 | nbproject/build-impl.xml.stylesheet.CRC32=05530350@1.79.1.48 9 | -------------------------------------------------------------------------------- /src/orphange/Orphange.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package orphange; 7 | 8 | /** 9 | * 10 | * @author tanu 11 | */ 12 | public class Orphange { 13 | 14 | /** 15 | * @param args the command line arguments 16 | */ 17 | public static void main(String[] args) { 18 | // TODO code application logic here 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | orphange 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | file:/C:/Users/Muska/OneDrive/Documents/NetBeansProjects/orphange/src/LoginForm.java 7 | file:/C:/Users/Muska/OneDrive/Documents/NetBeansProjects/orphange/src/DonationForm.java 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /src/Data.java: -------------------------------------------------------------------------------- 1 | 2 | import java.sql.Connection; 3 | import java.sql.DriverManager; 4 | 5 | /* 6 | * To change this license header, choose License Headers in Project Properties. 7 | * To change this template file, choose Tools | Templates 8 | * and open the template in the editor. 9 | */ 10 | 11 | /** 12 | * 13 | * @author tanu 14 | */ 15 | public class Data { 16 | 17 | public static Connection connect() 18 | { 19 | Connection con=null; 20 | try{ 21 | 22 | 23 | Class.forName("com.mysql.jdbc.Driver"); 24 | con=DriverManager.getConnection("jdbc:mysql://localhost:3306/data5","root","root"); 25 | } 26 | catch(Exception e) 27 | { 28 | System.out.println(e); 29 | 30 | } 31 | return con; 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /nbproject/project.properties: -------------------------------------------------------------------------------- 1 | annotation.processing.enabled=true 2 | annotation.processing.enabled.in.editor=false 3 | annotation.processing.processors.list= 4 | annotation.processing.run.all.processors=true 5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output 6 | application.title=orphange 7 | application.vendor=tanu 8 | build.classes.dir=${build.dir}/classes 9 | build.classes.excludes=**/*.java,**/*.form 10 | # This directory is removed when the project is cleaned: 11 | build.dir=build 12 | build.generated.dir=${build.dir}/generated 13 | build.generated.sources.dir=${build.dir}/generated-sources 14 | # Only compile against the classpath explicitly listed here: 15 | build.sysclasspath=ignore 16 | build.test.classes.dir=${build.dir}/test/classes 17 | build.test.results.dir=${build.dir}/test/results 18 | # Uncomment to specify the preferred debugger connection transport: 19 | #debug.transport=dt_socket 20 | debug.classpath=\ 21 | ${run.classpath} 22 | debug.test.classpath=\ 23 | ${run.test.classpath} 24 | # Files in build.classes.dir which should be excluded from distribution jar 25 | dist.archive.excludes= 26 | # This directory is removed when the project is cleaned: 27 | dist.dir=dist 28 | dist.jar=${dist.dir}/orphange.jar 29 | dist.javadoc.dir=${dist.dir}/javadoc 30 | endorsed.classpath= 31 | excludes= 32 | includes=** 33 | jar.compress=false 34 | javac.classpath=\ 35 | ${libs.MySQLDriver.classpath}:\ 36 | ${libs.absolutelayout.classpath} 37 | # Space-separated list of extra javac options 38 | javac.compilerargs= 39 | javac.deprecation=false 40 | javac.external.vm=true 41 | javac.processorpath=\ 42 | ${javac.classpath} 43 | javac.source=1.8 44 | javac.target=1.8 45 | javac.test.classpath=\ 46 | ${javac.classpath}:\ 47 | ${build.classes.dir} 48 | javac.test.processorpath=\ 49 | ${javac.test.classpath} 50 | javadoc.additionalparam= 51 | javadoc.author=false 52 | javadoc.encoding=${source.encoding} 53 | javadoc.noindex=false 54 | javadoc.nonavbar=false 55 | javadoc.notree=false 56 | javadoc.private=false 57 | javadoc.splitindex=true 58 | javadoc.use=true 59 | javadoc.version=false 60 | javadoc.windowtitle= 61 | main.class=orphange.Orphange 62 | manifest.file=manifest.mf 63 | meta.inf.dir=${src.dir}/META-INF 64 | mkdist.disabled=false 65 | platform.active=default_platform 66 | run.classpath=\ 67 | ${javac.classpath}:\ 68 | ${build.classes.dir} 69 | # Space-separated list of JVM arguments used when running the project. 70 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value. 71 | # To set system properties for unit tests define test-sys-prop.name=value: 72 | run.jvmargs= 73 | run.test.classpath=\ 74 | ${javac.test.classpath}:\ 75 | ${build.test.classes.dir} 76 | source.encoding=UTF-8 77 | src.dir=src 78 | test.src.dir=test 79 | -------------------------------------------------------------------------------- /src/Update.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
64 | -------------------------------------------------------------------------------- /src/ShowData.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 |
86 | -------------------------------------------------------------------------------- /src/child/SelectChildData.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | /** 8 | * 9 | * @author tanu 10 | */ 11 | package child; 12 | public class SelectChildData extends javax.swing.JFrame { 13 | 14 | /** 15 | * Creates new form SelectChildData 16 | */ 17 | public SelectChildData() { 18 | initComponents(); 19 | 20 | } 21 | 22 | /** 23 | * This method is called from within the constructor to initialize the form. 24 | * WARNING: Do NOT modify this code. The content of this method is always 25 | * regenerated by the Form Editor. 26 | */ 27 | @SuppressWarnings("unchecked") 28 | // //GEN-BEGIN:initComponents 29 | private void initComponents() { 30 | 31 | jScrollPane1 = new javax.swing.JScrollPane(); 32 | Table1 = new javax.swing.JTable(); 33 | 34 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 35 | 36 | Table1.setModel(new javax.swing.table.DefaultTableModel( 37 | new Object [][] { 38 | {null, null, null, null, null, null, null}, 39 | {null, null, null, null, null, null, null}, 40 | {null, null, null, null, null, null, null} 41 | }, 42 | new String [] { 43 | "Child Id", "Child Name", "age", "class", "bloodG", "HealthIss", "image" 44 | } 45 | )); 46 | jScrollPane1.setViewportView(Table1); 47 | 48 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 49 | getContentPane().setLayout(layout); 50 | layout.setHorizontalGroup( 51 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 52 | .addGroup(layout.createSequentialGroup() 53 | .addContainerGap() 54 | .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 420, Short.MAX_VALUE) 55 | .addContainerGap()) 56 | ); 57 | layout.setVerticalGroup( 58 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 59 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 60 | .addContainerGap(14, Short.MAX_VALUE) 61 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 194, javax.swing.GroupLayout.PREFERRED_SIZE) 62 | .addGap(92, 92, 92)) 63 | ); 64 | 65 | pack(); 66 | }// //GEN-END:initComponents 67 | 68 | /** 69 | * @param args the command line arguments 70 | */ 71 | public static void main(String args[]) { 72 | /* Set the Nimbus look and feel */ 73 | // 74 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 75 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 76 | */ 77 | try { 78 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 79 | if ("Nimbus".equals(info.getName())) { 80 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 81 | break; 82 | } 83 | } 84 | } catch (ClassNotFoundException ex) { 85 | java.util.logging.Logger.getLogger(SelectChildData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 86 | } catch (InstantiationException ex) { 87 | java.util.logging.Logger.getLogger(SelectChildData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 88 | } catch (IllegalAccessException ex) { 89 | java.util.logging.Logger.getLogger(SelectChildData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 90 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 91 | java.util.logging.Logger.getLogger(SelectChildData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 92 | } 93 | // 94 | 95 | /* Create and display the form */ 96 | java.awt.EventQueue.invokeLater(new Runnable() { 97 | public void run() { 98 | new SelectChildData().setVisible(true); 99 | } 100 | }); 101 | } 102 | 103 | // Variables declaration - do not modify//GEN-BEGIN:variables 104 | private javax.swing.JTable Table1; 105 | private javax.swing.JScrollPane jScrollPane1; 106 | // End of variables declaration//GEN-END:variables 107 | } 108 | -------------------------------------------------------------------------------- /src/Update.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | /** 8 | * 9 | * @author tanu 10 | */ 11 | public class Update extends javax.swing.JFrame { 12 | 13 | /** 14 | * Creates new form Update 15 | */ 16 | public Update() { 17 | initComponents(); 18 | } 19 | 20 | /** 21 | * This method is called from within the constructor to initialize the form. 22 | * WARNING: Do NOT modify this code. The content of this method is always 23 | * regenerated by the Form Editor. 24 | */ 25 | @SuppressWarnings("unchecked") 26 | // //GEN-BEGIN:initComponents 27 | private void initComponents() { 28 | 29 | jButton1 = new javax.swing.JButton(); 30 | jButton2 = new javax.swing.JButton(); 31 | 32 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 33 | 34 | jButton1.setText("Update Child Details"); 35 | 36 | jButton2.setText("Update Staff Details"); 37 | jButton2.addActionListener(new java.awt.event.ActionListener() { 38 | public void actionPerformed(java.awt.event.ActionEvent evt) { 39 | jButton2ActionPerformed(evt); 40 | } 41 | }); 42 | 43 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 44 | getContentPane().setLayout(layout); 45 | layout.setHorizontalGroup( 46 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 47 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 48 | .addContainerGap(118, Short.MAX_VALUE) 49 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 50 | .addComponent(jButton2) 51 | .addComponent(jButton1)) 52 | .addGap(153, 153, 153)) 53 | ); 54 | layout.setVerticalGroup( 55 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 56 | .addGroup(layout.createSequentialGroup() 57 | .addGap(82, 82, 82) 58 | .addComponent(jButton1) 59 | .addGap(32, 32, 32) 60 | .addComponent(jButton2) 61 | .addContainerGap(140, Short.MAX_VALUE)) 62 | ); 63 | 64 | pack(); 65 | }// //GEN-END:initComponents 66 | 67 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed 68 | // TODO add your handling code here: 69 | }//GEN-LAST:event_jButton2ActionPerformed 70 | 71 | /** 72 | * @param args the command line arguments 73 | */ 74 | public static void main(String args[]) { 75 | /* Set the Nimbus look and feel */ 76 | // 77 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 78 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 79 | */ 80 | try { 81 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 82 | if ("Nimbus".equals(info.getName())) { 83 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 84 | break; 85 | } 86 | } 87 | } catch (ClassNotFoundException ex) { 88 | java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 89 | } catch (InstantiationException ex) { 90 | java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 91 | } catch (IllegalAccessException ex) { 92 | java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 93 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 94 | java.util.logging.Logger.getLogger(Update.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 95 | } 96 | // 97 | 98 | /* Create and display the form */ 99 | java.awt.EventQueue.invokeLater(new Runnable() { 100 | public void run() { 101 | new Update().setVisible(true); 102 | } 103 | }); 104 | } 105 | 106 | // Variables declaration - do not modify//GEN-BEGIN:variables 107 | private javax.swing.JButton jButton1; 108 | private javax.swing.JButton jButton2; 109 | // End of variables declaration//GEN-END:variables 110 | } 111 | -------------------------------------------------------------------------------- /src/SelectStaff.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 |
61 |
62 | 63 | 64 | 65 | 66 | <Editor/> 67 | <Renderer/> 68 | </Column> 69 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 70 | <Title/> 71 | <Editor/> 72 | <Renderer/> 73 | </Column> 74 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 75 | <Title/> 76 | <Editor/> 77 | <Renderer/> 78 | </Column> 79 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 80 | <Title/> 81 | <Editor/> 82 | <Renderer/> 83 | </Column> 84 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 85 | <Title/> 86 | <Editor/> 87 | <Renderer/> 88 | </Column> 89 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 90 | <Title/> 91 | <Editor/> 92 | <Renderer/> 93 | </Column> 94 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 95 | <Title/> 96 | <Editor/> 97 | <Renderer/> 98 | </Column> 99 | </TableColumnModel> 100 | </Property> 101 | <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> 102 | <TableHeader reorderingAllowed="true" resizingAllowed="true"/> 103 | </Property> 104 | </Properties> 105 | </Component> 106 | </SubComponents> 107 | </Container> 108 | </SubComponents> 109 | </Form> 110 | -------------------------------------------------------------------------------- /src/child/SelectChildData.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <Properties> 5 | <Property name="defaultCloseOperation" type="int" value="3"/> 6 | </Properties> 7 | <SyntheticProperties> 8 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 9 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 10 | </SyntheticProperties> 11 | <AuxValues> 12 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 13 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 14 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 15 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 16 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 17 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 18 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 19 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 20 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 21 | </AuxValues> 22 | 23 | <Layout> 24 | <DimensionLayout dim="0"> 25 | <Group type="103" groupAlignment="0" attributes="0"> 26 | <Group type="102" alignment="0" attributes="0"> 27 | <EmptySpace max="-2" attributes="0"/> 28 | <Component id="jScrollPane1" pref="420" max="32767" attributes="0"/> 29 | <EmptySpace max="-2" attributes="0"/> 30 | </Group> 31 | </Group> 32 | </DimensionLayout> 33 | <DimensionLayout dim="1"> 34 | <Group type="103" groupAlignment="0" attributes="0"> 35 | <Group type="102" alignment="1" attributes="0"> 36 | <EmptySpace pref="14" max="32767" attributes="0"/> 37 | <Component id="jScrollPane1" min="-2" pref="194" max="-2" attributes="0"/> 38 | <EmptySpace min="-2" pref="92" max="-2" attributes="0"/> 39 | </Group> 40 | </Group> 41 | </DimensionLayout> 42 | </Layout> 43 | <SubComponents> 44 | <Container class="javax.swing.JScrollPane" name="jScrollPane1"> 45 | <AuxValues> 46 | <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> 47 | </AuxValues> 48 | 49 | <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> 50 | <SubComponents> 51 | <Component class="javax.swing.JTable" name="Table1"> 52 | <Properties> 53 | <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> 54 | <Table columnCount="7" rowCount="3"> 55 | <Column editable="true" title="Child Id" type="java.lang.Object"/> 56 | <Column editable="true" title="Child Name" type="java.lang.Object"/> 57 | <Column editable="true" title="age" type="java.lang.Object"/> 58 | <Column editable="true" title="class" type="java.lang.Object"/> 59 | <Column editable="true" title="bloodG" type="java.lang.Object"/> 60 | <Column editable="true" title="HealthIss" type="java.lang.Object"/> 61 | <Column editable="true" title="image" type="java.lang.Object"/> 62 | </Table> 63 | </Property> 64 | <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> 65 | <TableColumnModel selectionModel="0"> 66 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 67 | <Title/> 68 | <Editor/> 69 | <Renderer/> 70 | </Column> 71 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 72 | <Title/> 73 | <Editor/> 74 | <Renderer/> 75 | </Column> 76 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 77 | <Title/> 78 | <Editor/> 79 | <Renderer/> 80 | </Column> 81 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 82 | <Title/> 83 | <Editor/> 84 | <Renderer/> 85 | </Column> 86 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 87 | <Title/> 88 | <Editor/> 89 | <Renderer/> 90 | </Column> 91 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 92 | <Title/> 93 | <Editor/> 94 | <Renderer/> 95 | </Column> 96 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 97 | <Title/> 98 | <Editor/> 99 | <Renderer/> 100 | </Column> 101 | </TableColumnModel> 102 | </Property> 103 | <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> 104 | <TableHeader reorderingAllowed="true" resizingAllowed="true"/> 105 | </Property> 106 | </Properties> 107 | </Component> 108 | </SubComponents> 109 | </Container> 110 | </SubComponents> 111 | </Form> 112 | -------------------------------------------------------------------------------- /src/SignUpPage.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <Properties> 5 | <Property name="defaultCloseOperation" type="int" value="3"/> 6 | </Properties> 7 | <SyntheticProperties> 8 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 9 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 10 | </SyntheticProperties> 11 | <AuxValues> 12 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 13 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 14 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 15 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 16 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 17 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 18 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 19 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 20 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 21 | </AuxValues> 22 | 23 | <Layout> 24 | <DimensionLayout dim="0"> 25 | <Group type="103" groupAlignment="0" attributes="0"> 26 | <Group type="102" alignment="0" attributes="0"> 27 | <EmptySpace min="-2" pref="79" max="-2" attributes="0"/> 28 | <Group type="103" groupAlignment="0" attributes="0"> 29 | <Group type="102" alignment="0" attributes="0"> 30 | <Group type="103" groupAlignment="0" attributes="0"> 31 | <Group type="102" attributes="0"> 32 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 33 | <EmptySpace type="separate" max="-2" attributes="0"/> 34 | <Component id="t2" max="32767" attributes="0"/> 35 | </Group> 36 | <Group type="102" attributes="0"> 37 | <Component id="jLabel1" min="-2" pref="50" max="-2" attributes="0"/> 38 | <EmptySpace pref="47" max="32767" attributes="0"/> 39 | <Component id="t1" min="-2" pref="152" max="-2" attributes="0"/> 40 | </Group> 41 | </Group> 42 | <EmptySpace min="-2" pref="72" max="-2" attributes="0"/> 43 | </Group> 44 | <Group type="102" alignment="0" attributes="0"> 45 | <EmptySpace min="-2" pref="97" max="-2" attributes="0"/> 46 | <Component id="jLabel3" min="-2" pref="166" max="-2" attributes="0"/> 47 | <EmptySpace max="-2" attributes="0"/> 48 | </Group> 49 | </Group> 50 | </Group> 51 | <Group type="102" alignment="1" attributes="0"> 52 | <EmptySpace max="32767" attributes="0"/> 53 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 54 | <EmptySpace min="-2" pref="157" max="-2" attributes="0"/> 55 | </Group> 56 | <Group type="102" alignment="0" attributes="0"> 57 | <EmptySpace min="-2" pref="104" max="-2" attributes="0"/> 58 | <Component id="jLabel4" min="-2" pref="94" max="-2" attributes="0"/> 59 | <EmptySpace max="32767" attributes="0"/> 60 | </Group> 61 | </Group> 62 | </DimensionLayout> 63 | <DimensionLayout dim="1"> 64 | <Group type="103" groupAlignment="0" attributes="0"> 65 | <Group type="102" alignment="0" attributes="0"> 66 | <EmptySpace min="-2" pref="41" max="-2" attributes="0"/> 67 | <Group type="103" groupAlignment="3" attributes="0"> 68 | <Component id="t1" alignment="3" min="-2" max="-2" attributes="0"/> 69 | <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> 70 | </Group> 71 | <EmptySpace type="separate" max="-2" attributes="0"/> 72 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> 73 | <EmptySpace min="-2" pref="36" max="-2" attributes="0"/> 74 | <Group type="103" groupAlignment="1" attributes="0"> 75 | <Component id="t2" min="-2" max="-2" attributes="0"/> 76 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 77 | </Group> 78 | <EmptySpace min="-2" pref="54" max="-2" attributes="0"/> 79 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 80 | <EmptySpace type="unrelated" max="-2" attributes="0"/> 81 | <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 82 | <EmptySpace pref="49" max="32767" attributes="0"/> 83 | </Group> 84 | </Group> 85 | </DimensionLayout> 86 | </Layout> 87 | <SubComponents> 88 | <Component class="javax.swing.JLabel" name="jLabel1"> 89 | <Properties> 90 | <Property name="text" type="java.lang.String" value="Id"/> 91 | </Properties> 92 | </Component> 93 | <Component class="javax.swing.JLabel" name="jLabel2"> 94 | <Properties> 95 | <Property name="text" type="java.lang.String" value="Create password"/> 96 | </Properties> 97 | </Component> 98 | <Component class="javax.swing.JTextField" name="t1"> 99 | </Component> 100 | <Component class="javax.swing.JTextField" name="t2"> 101 | </Component> 102 | <Component class="javax.swing.JButton" name="jButton1"> 103 | <Properties> 104 | <Property name="text" type="java.lang.String" value="OK"/> 105 | </Properties> 106 | <Events> 107 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 108 | </Events> 109 | </Component> 110 | <Component class="javax.swing.JLabel" name="jLabel3"> 111 | <Properties> 112 | <Property name="text" type="java.lang.String" value="jLabel3"/> 113 | </Properties> 114 | </Component> 115 | <Component class="javax.swing.JLabel" name="jLabel4"> 116 | <Properties> 117 | <Property name="text" type="java.lang.String" value="jLabel4"/> 118 | </Properties> 119 | </Component> 120 | </SubComponents> 121 | </Form> 122 | -------------------------------------------------------------------------------- /src/SelectStaff.java: -------------------------------------------------------------------------------- 1 | 2 | import java.sql.Connection; 3 | import java.sql.PreparedStatement; 4 | import java.sql.ResultSet; 5 | import java.sql.ResultSetMetaData; 6 | import java.sql.SQLException; 7 | import java.sql.Statement; 8 | import java.util.Vector; 9 | import java.util.logging.Level; 10 | import java.util.logging.Logger; 11 | import javax.swing.table.DefaultTableModel; 12 | 13 | /* 14 | * To change this license header, choose License Headers in Project Properties. 15 | * To change this template file, choose Tools | Templates 16 | * and open the template in the editor. 17 | */ 18 | 19 | /** 20 | * 21 | * @author tanu 22 | */ 23 | public class SelectStaff extends javax.swing.JFrame { 24 | 25 | /** 26 | * Creates new form SelectStaff 27 | */private Connection con; 28 | private PreparedStatement ps; 29 | public SelectStaff() { 30 | initComponents(); 31 | con=Data.connect(); 32 | SelectDatas(); 33 | } 34 | void SelectDatas() 35 | { 36 | String sql="select*from staff"; 37 | Statement stm; 38 | try { 39 | stm = con.createStatement(); 40 | String[] tableColumnsName={"Id","passoword","name","mobile","address","work","email"}; 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | DefaultTableModel aModel=(DefaultTableModel)Table1.getModel(); 49 | aModel.setColumnIdentifiers(tableColumnsName); 50 | ResultSet rs= stm.executeQuery(sql); 51 | ResultSetMetaData rsmd=rs.getMetaData(); 52 | int colno=rsmd.getColumnCount(); 53 | while(rs.next()) 54 | { 55 | Object[] obj=new Object[colno]; 56 | for(int i=0;i<colno;i++) 57 | { 58 | obj[i]=rs.getObject(i+1); 59 | } 60 | aModel.addRow(obj); 61 | } 62 | Table1.setModel(aModel); 63 | } catch (SQLException ex) { 64 | Logger.getLogger(SelectStaff.class.getName()).log(Level.SEVERE, null, ex); 65 | } 66 | 67 | 68 | } 69 | /* int id; 70 | String password,name,mobile,address,work,email; 71 | public SelectStaff(int v1,String v2,String v3,String v4,String v5,String v6,String v7) 72 | { 73 | initComponents(); 74 | this.id=v1; 75 | this.password=v2; 76 | this.name=v3; 77 | this.mobile=v4; 78 | this.address=v5; 79 | this.work=v6; 80 | this.email=v7; 81 | AddDataToTable(); 82 | 83 | } 84 | void AddDataToTable() 85 | { 86 | DefaultTableModel aModel=(DefaultTableModel)Table1.getModel(); 87 | Vector v=new Vector(); 88 | for(int i=0;i<4;i++) 89 | { 90 | v.add(id); 91 | v.add(password); 92 | v.add(name); 93 | v.add(mobile); 94 | v.add(address); 95 | v.add(work); 96 | v.add(email); 97 | aModel.addRow(v); 98 | } 99 | }*/ 100 | /** 101 | * This method is called from within the constructor to initialize the form. 102 | * WARNING: Do NOT modify this code. The content of this method is always 103 | * regenerated by the Form Editor. 104 | */ 105 | @SuppressWarnings("unchecked") 106 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 107 | private void initComponents() { 108 | 109 | jScrollPane1 = new javax.swing.JScrollPane(); 110 | Table1 = new javax.swing.JTable(); 111 | 112 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 113 | 114 | Table1.setModel(new javax.swing.table.DefaultTableModel( 115 | new Object [][] { 116 | 117 | }, 118 | new String [] { 119 | "Id", "Password", "Name", "Mobile", "Address", "Work", "Email" 120 | } 121 | )); 122 | jScrollPane1.setViewportView(Table1); 123 | 124 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 125 | getContentPane().setLayout(layout); 126 | layout.setHorizontalGroup( 127 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 128 | .addGroup(layout.createSequentialGroup() 129 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 375, javax.swing.GroupLayout.PREFERRED_SIZE) 130 | .addGap(0, 25, Short.MAX_VALUE)) 131 | ); 132 | layout.setVerticalGroup( 133 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 134 | .addGroup(layout.createSequentialGroup() 135 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE) 136 | .addGap(0, 25, Short.MAX_VALUE)) 137 | ); 138 | 139 | pack(); 140 | }// </editor-fold>//GEN-END:initComponents 141 | 142 | /** 143 | * @param args the command line arguments 144 | */ 145 | public static void main(String args[]) { 146 | /* Set the Nimbus look and feel */ 147 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 148 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 149 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 150 | */ 151 | try { 152 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 153 | if ("Nimbus".equals(info.getName())) { 154 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 155 | break; 156 | } 157 | } 158 | } catch (ClassNotFoundException ex) { 159 | java.util.logging.Logger.getLogger(SelectStaff.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 160 | } catch (InstantiationException ex) { 161 | java.util.logging.Logger.getLogger(SelectStaff.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 162 | } catch (IllegalAccessException ex) { 163 | java.util.logging.Logger.getLogger(SelectStaff.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 164 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 165 | java.util.logging.Logger.getLogger(SelectStaff.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 166 | } 167 | //</editor-fold> 168 | 169 | /* Create and display the form */ 170 | java.awt.EventQueue.invokeLater(new Runnable() { 171 | public void run() { 172 | new SelectStaff().setVisible(true); 173 | } 174 | }); 175 | } 176 | 177 | // Variables declaration - do not modify//GEN-BEGIN:variables 178 | private javax.swing.JTable Table1; 179 | private javax.swing.JScrollPane jScrollPane1; 180 | // End of variables declaration//GEN-END:variables 181 | } 182 | -------------------------------------------------------------------------------- /src/ChildDetails.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <NonVisualComponents> 5 | <Component class="javax.swing.JLabel" name="jLabel2"> 6 | <Properties> 7 | <Property name="text" type="java.lang.String" value="jLabel2"/> 8 | </Properties> 9 | </Component> 10 | </NonVisualComponents> 11 | <Properties> 12 | <Property name="defaultCloseOperation" type="int" value="3"/> 13 | </Properties> 14 | <SyntheticProperties> 15 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 16 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 17 | </SyntheticProperties> 18 | <AuxValues> 19 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 20 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 21 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 22 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 23 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 24 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 25 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 26 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 27 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 28 | </AuxValues> 29 | 30 | <Layout> 31 | <DimensionLayout dim="0"> 32 | <Group type="103" groupAlignment="0" attributes="0"> 33 | <Group type="102" attributes="0"> 34 | <Group type="103" groupAlignment="1" attributes="0"> 35 | <Component id="jScrollPane1" min="-2" pref="473" max="-2" attributes="0"/> 36 | <Group type="102" attributes="0"> 37 | <EmptySpace min="-2" pref="219" max="-2" attributes="0"/> 38 | <Component id="jLabel1" min="-2" max="-2" attributes="0"/> 39 | <EmptySpace min="-2" pref="221" max="-2" attributes="0"/> 40 | </Group> 41 | </Group> 42 | <EmptySpace pref="266" max="32767" attributes="0"/> 43 | </Group> 44 | </Group> 45 | </DimensionLayout> 46 | <DimensionLayout dim="1"> 47 | <Group type="103" groupAlignment="0" attributes="0"> 48 | <Group type="102" alignment="0" attributes="0"> 49 | <EmptySpace max="-2" attributes="0"/> 50 | <Component id="jLabel1" min="-2" max="-2" attributes="0"/> 51 | <EmptySpace max="-2" attributes="0"/> 52 | <Component id="jScrollPane1" min="-2" pref="182" max="-2" attributes="0"/> 53 | <EmptySpace pref="219" max="32767" attributes="0"/> 54 | </Group> 55 | </Group> 56 | </DimensionLayout> 57 | </Layout> 58 | <SubComponents> 59 | <Component class="javax.swing.JLabel" name="jLabel1"> 60 | <Properties> 61 | <Property name="text" type="java.lang.String" value="Child Details"/> 62 | </Properties> 63 | </Component> 64 | <Container class="javax.swing.JScrollPane" name="jScrollPane1"> 65 | <AuxValues> 66 | <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/> 67 | </AuxValues> 68 | 69 | <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/> 70 | <SubComponents> 71 | <Component class="javax.swing.JTable" name="Table1"> 72 | <Properties> 73 | <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor"> 74 | <Table columnCount="8" rowCount="0"> 75 | <Column editable="true" title="Id" type="java.lang.Object"/> 76 | <Column editable="true" title="Name" type="java.lang.Object"/> 77 | <Column editable="true" title="Age" type="java.lang.Object"/> 78 | <Column editable="true" title="Class" type="java.lang.Object"/> 79 | <Column editable="true" title="bloodG" type="java.lang.Object"/> 80 | <Column editable="true" title="healthIss" type="java.lang.Object"/> 81 | <Column editable="true" title="image" type="java.lang.Byte"/> 82 | <Column editable="true" title="Action" type="java.lang.Object"/> 83 | </Table> 84 | </Property> 85 | <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor"> 86 | <TableColumnModel selectionModel="0"> 87 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 88 | <Title/> 89 | <Editor/> 90 | <Renderer/> 91 | </Column> 92 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 93 | <Title/> 94 | <Editor/> 95 | <Renderer/> 96 | </Column> 97 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 98 | <Title/> 99 | <Editor/> 100 | <Renderer/> 101 | </Column> 102 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 103 | <Title/> 104 | <Editor/> 105 | <Renderer/> 106 | </Column> 107 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 108 | <Title/> 109 | <Editor/> 110 | <Renderer/> 111 | </Column> 112 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 113 | <Title/> 114 | <Editor/> 115 | <Renderer/> 116 | </Column> 117 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 118 | <Title/> 119 | <Editor/> 120 | <Renderer/> 121 | </Column> 122 | <Column maxWidth="-1" minWidth="-1" prefWidth="-1" resizable="true"> 123 | <Title/> 124 | <Editor/> 125 | <Renderer/> 126 | </Column> 127 | </TableColumnModel> 128 | </Property> 129 | <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor"> 130 | <TableHeader reorderingAllowed="true" resizingAllowed="true"/> 131 | </Property> 132 | </Properties> 133 | <Events> 134 | <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="Table1MouseClicked"/> 135 | </Events> 136 | </Component> 137 | </SubComponents> 138 | </Container> 139 | </SubComponents> 140 | </Form> 141 | -------------------------------------------------------------------------------- /src/ShowData.java: -------------------------------------------------------------------------------- 1 | 2 | import child.*; 3 | import java.sql.Connection; 4 | import java.sql.PreparedStatement; 5 | import java.sql.ResultSet; 6 | import java.sql.SQLException; 7 | import java.sql.Statement; 8 | import java.util.ArrayList; 9 | import java.util.logging.Level; 10 | import java.util.logging.Logger; 11 | import javax.swing.table.DefaultTableModel; 12 | 13 | /* 14 | * To change this license header, choose License Headers in Project Properties. 15 | * To change this template file, choose Tools | Templates 16 | * and open the template in the editor. 17 | */ 18 | 19 | /** 20 | * 21 | * @author tanu 22 | */ 23 | public class ShowData extends javax.swing.JFrame { 24 | 25 | /** 26 | * Creates new form ShowData 27 | */ 28 | private Connection con; 29 | private PreparedStatement ps; 30 | public ShowData() { 31 | initComponents(); 32 | 33 | con=Data.connect(); 34 | 35 | 36 | } 37 | 38 | 39 | /** 40 | * This method is called from within the constructor to initialize the form. 41 | * WARNING: Do NOT modify this code. The content of this method is always 42 | * regenerated by the Form Editor. 43 | */ 44 | @SuppressWarnings("unchecked") 45 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 46 | private void initComponents() { 47 | 48 | jButton1 = new javax.swing.JButton(); 49 | jButton2 = new javax.swing.JButton(); 50 | jButton3 = new javax.swing.JButton(); 51 | jButton4 = new javax.swing.JButton(); 52 | 53 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 54 | 55 | jButton1.setText("For Child Details"); 56 | jButton1.addActionListener(new java.awt.event.ActionListener() { 57 | public void actionPerformed(java.awt.event.ActionEvent evt) { 58 | jButton1ActionPerformed(evt); 59 | } 60 | }); 61 | 62 | jButton2.setText("For Staff Details"); 63 | jButton2.addActionListener(new java.awt.event.ActionListener() { 64 | public void actionPerformed(java.awt.event.ActionEvent evt) { 65 | jButton2ActionPerformed(evt); 66 | } 67 | }); 68 | 69 | jButton3.setText("For Parent Details"); 70 | 71 | jButton4.setText("For Donation Details"); 72 | jButton4.addActionListener(new java.awt.event.ActionListener() { 73 | public void actionPerformed(java.awt.event.ActionEvent evt) { 74 | jButton4ActionPerformed(evt); 75 | } 76 | }); 77 | 78 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 79 | getContentPane().setLayout(layout); 80 | layout.setHorizontalGroup( 81 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 82 | .addGroup(layout.createSequentialGroup() 83 | .addGap(136, 136, 136) 84 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 85 | .addComponent(jButton4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 86 | .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 87 | .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 88 | .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 89 | .addContainerGap(135, Short.MAX_VALUE)) 90 | ); 91 | layout.setVerticalGroup( 92 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 93 | .addGroup(layout.createSequentialGroup() 94 | .addGap(45, 45, 45) 95 | .addComponent(jButton1) 96 | .addGap(18, 18, 18) 97 | .addComponent(jButton2) 98 | .addGap(29, 29, 29) 99 | .addComponent(jButton3) 100 | .addGap(32, 32, 32) 101 | .addComponent(jButton4) 102 | .addContainerGap(84, Short.MAX_VALUE)) 103 | ); 104 | 105 | pack(); 106 | }// </editor-fold>//GEN-END:initComponents 107 | 108 | private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed 109 | // TODO add your handling code here: 110 | }//GEN-LAST:event_jButton4ActionPerformed 111 | 112 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed 113 | 114 | 115 | 116 | 117 | 118 | }//GEN-LAST:event_jButton2ActionPerformed 119 | 120 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 121 | // TODO add your handling code here: 122 | ChildDetails ch=new ChildDetails(); 123 | ch.setVisible(true); 124 | 125 | }//GEN-LAST:event_jButton1ActionPerformed 126 | 127 | /** 128 | * @param args the command line arguments 129 | */ 130 | public static void main(String args[]) { 131 | /* Set the Nimbus look and feel */ 132 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 133 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 134 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 135 | */ 136 | try { 137 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 138 | if ("Nimbus".equals(info.getName())) { 139 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 140 | break; 141 | } 142 | } 143 | } catch (ClassNotFoundException ex) { 144 | java.util.logging.Logger.getLogger(ShowData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 145 | } catch (InstantiationException ex) { 146 | java.util.logging.Logger.getLogger(ShowData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 147 | } catch (IllegalAccessException ex) { 148 | java.util.logging.Logger.getLogger(ShowData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 149 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 150 | java.util.logging.Logger.getLogger(ShowData.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 151 | } 152 | //</editor-fold> 153 | 154 | /* Create and display the form */ 155 | java.awt.EventQueue.invokeLater(new Runnable() { 156 | public void run() { 157 | new ShowData().setVisible(true); 158 | } 159 | }); 160 | } 161 | 162 | // Variables declaration - do not modify//GEN-BEGIN:variables 163 | private javax.swing.JButton jButton1; 164 | private javax.swing.JButton jButton2; 165 | private javax.swing.JButton jButton3; 166 | private javax.swing.JButton jButton4; 167 | // End of variables declaration//GEN-END:variables 168 | } 169 | -------------------------------------------------------------------------------- /src/LinkForm.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <NonVisualComponents> 5 | <Component class="javax.swing.JLabel" name="jLabel1"> 6 | <Properties> 7 | <Property name="text" type="java.lang.String" value="jLabel1"/> 8 | </Properties> 9 | </Component> 10 | </NonVisualComponents> 11 | <Properties> 12 | <Property name="defaultCloseOperation" type="int" value="3"/> 13 | </Properties> 14 | <SyntheticProperties> 15 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 16 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 17 | </SyntheticProperties> 18 | <AuxValues> 19 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 20 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 21 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 22 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 23 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 24 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 25 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 26 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 27 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 28 | </AuxValues> 29 | 30 | <Layout> 31 | <DimensionLayout dim="0"> 32 | <Group type="103" groupAlignment="0" attributes="0"> 33 | <Group type="102" alignment="0" attributes="0"> 34 | <EmptySpace min="-2" pref="136" max="-2" attributes="0"/> 35 | <Group type="103" groupAlignment="0" attributes="0"> 36 | <Group type="102" attributes="0"> 37 | <Group type="103" groupAlignment="0" attributes="0"> 38 | <Component id="jButton1" min="-2" pref="92" max="-2" attributes="0"/> 39 | <Component id="jButton2" alignment="0" min="-2" max="-2" attributes="0"/> 40 | <Component id="jButton4" alignment="0" min="-2" max="-2" attributes="0"/> 41 | <Component id="jButton3" alignment="0" min="-2" max="-2" attributes="0"/> 42 | <Component id="jButton5" alignment="0" min="-2" max="-2" attributes="0"/> 43 | </Group> 44 | <EmptySpace max="32767" attributes="0"/> 45 | </Group> 46 | <Group type="102" attributes="0"> 47 | <Group type="103" groupAlignment="0" attributes="0"> 48 | <Component id="jButton6" min="-2" max="-2" attributes="0"/> 49 | <Component id="cDetails" min="-2" max="-2" attributes="0"/> 50 | </Group> 51 | <EmptySpace min="0" pref="155" max="32767" attributes="0"/> 52 | </Group> 53 | </Group> 54 | </Group> 55 | </Group> 56 | </DimensionLayout> 57 | <DimensionLayout dim="1"> 58 | <Group type="103" groupAlignment="0" attributes="0"> 59 | <Group type="102" alignment="0" attributes="0"> 60 | <EmptySpace min="-2" pref="30" max="-2" attributes="0"/> 61 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 62 | <EmptySpace type="separate" max="-2" attributes="0"/> 63 | <Component id="jButton2" min="-2" max="-2" attributes="0"/> 64 | <EmptySpace type="separate" max="-2" attributes="0"/> 65 | <Component id="jButton3" min="-2" max="-2" attributes="0"/> 66 | <EmptySpace type="separate" max="-2" attributes="0"/> 67 | <Component id="jButton4" min="-2" max="-2" attributes="0"/> 68 | <EmptySpace type="separate" max="-2" attributes="0"/> 69 | <Component id="jButton5" min="-2" max="-2" attributes="0"/> 70 | <EmptySpace type="separate" max="-2" attributes="0"/> 71 | <Component id="cDetails" min="-2" max="-2" attributes="0"/> 72 | <EmptySpace pref="19" max="32767" attributes="0"/> 73 | <Component id="jButton6" min="-2" max="-2" attributes="0"/> 74 | </Group> 75 | </Group> 76 | </DimensionLayout> 77 | </Layout> 78 | <SubComponents> 79 | <Component class="javax.swing.JButton" name="jButton1"> 80 | <Properties> 81 | <Property name="text" type="java.lang.String" value="Adopt"/> 82 | </Properties> 83 | <Events> 84 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 85 | </Events> 86 | </Component> 87 | <Component class="javax.swing.JButton" name="jButton2"> 88 | <Properties> 89 | <Property name="text" type="java.lang.String" value=" For Staff "/> 90 | </Properties> 91 | <Events> 92 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> 93 | </Events> 94 | </Component> 95 | <Component class="javax.swing.JButton" name="jButton3"> 96 | <Properties> 97 | <Property name="text" type="java.lang.String" value="donation"/> 98 | </Properties> 99 | <Events> 100 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton3ActionPerformed"/> 101 | </Events> 102 | </Component> 103 | <Component class="javax.swing.JButton" name="jButton4"> 104 | <Properties> 105 | <Property name="text" type="java.lang.String" value="Parent"/> 106 | </Properties> 107 | <Events> 108 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton4ActionPerformed"/> 109 | </Events> 110 | </Component> 111 | <Component class="javax.swing.JButton" name="jButton5"> 112 | <Properties> 113 | <Property name="text" type="java.lang.String" value="Update"/> 114 | </Properties> 115 | <Events> 116 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton5ActionPerformed"/> 117 | </Events> 118 | </Component> 119 | <Component class="javax.swing.JButton" name="cDetails"> 120 | <Properties> 121 | <Property name="text" type="java.lang.String" value="For Child Details"/> 122 | </Properties> 123 | <Events> 124 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="cDetailsActionPerformed"/> 125 | </Events> 126 | </Component> 127 | <Component class="javax.swing.JButton" name="jButton6"> 128 | <Properties> 129 | <Property name="text" type="java.lang.String" value="for admin"/> 130 | </Properties> 131 | <Events> 132 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton6ActionPerformed"/> 133 | </Events> 134 | </Component> 135 | </SubComponents> 136 | </Form> 137 | -------------------------------------------------------------------------------- /src/ParentForm.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <NonVisualComponents> 5 | <Component class="javax.swing.JTextField" name="jTextField1"> 6 | <Properties> 7 | <Property name="text" type="java.lang.String" value="jTextField1"/> 8 | </Properties> 9 | </Component> 10 | </NonVisualComponents> 11 | <Properties> 12 | <Property name="defaultCloseOperation" type="int" value="3"/> 13 | </Properties> 14 | <SyntheticProperties> 15 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 16 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 17 | </SyntheticProperties> 18 | <AuxValues> 19 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 20 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 21 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 22 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 23 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 24 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 25 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 26 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 27 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 28 | </AuxValues> 29 | 30 | <Layout> 31 | <DimensionLayout dim="0"> 32 | <Group type="103" groupAlignment="0" attributes="0"> 33 | <Group type="102" alignment="1" attributes="0"> 34 | <EmptySpace min="-2" pref="72" max="-2" attributes="0"/> 35 | <Group type="103" groupAlignment="0" attributes="0"> 36 | <Group type="102" attributes="0"> 37 | <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 38 | <Component id="jTextField2" min="-2" pref="0" max="-2" attributes="0"/> 39 | <EmptySpace min="-2" pref="6" max="-2" attributes="0"/> 40 | </Group> 41 | <Group type="102" attributes="0"> 42 | <EmptySpace min="10" pref="10" max="-2" attributes="0"/> 43 | <Group type="103" groupAlignment="0" attributes="0"> 44 | <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> 45 | <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> 46 | <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> 47 | <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> 48 | <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> 49 | </Group> 50 | <EmptySpace min="57" max="32767" attributes="0"/> 51 | </Group> 52 | </Group> 53 | <Group type="103" groupAlignment="0" max="-2" attributes="0"> 54 | <Component id="t2" pref="165" max="32767" attributes="0"/> 55 | <Component id="t3" alignment="0" max="32767" attributes="0"/> 56 | <Component id="t4" alignment="0" max="32767" attributes="0"/> 57 | <Component id="t5" alignment="0" max="32767" attributes="0"/> 58 | <Component id="t1" alignment="0" max="32767" attributes="0"/> 59 | </Group> 60 | <EmptySpace min="-2" pref="40" max="-2" attributes="0"/> 61 | </Group> 62 | <Group type="102" alignment="0" attributes="0"> 63 | <EmptySpace min="-2" pref="142" max="-2" attributes="0"/> 64 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 65 | <EmptySpace max="32767" attributes="0"/> 66 | </Group> 67 | </Group> 68 | </DimensionLayout> 69 | <DimensionLayout dim="1"> 70 | <Group type="103" groupAlignment="0" attributes="0"> 71 | <Group type="102" alignment="0" attributes="0"> 72 | <EmptySpace min="-2" pref="35" max="-2" attributes="0"/> 73 | <Group type="103" groupAlignment="3" attributes="0"> 74 | <Component id="jTextField2" alignment="3" min="-2" max="-2" attributes="0"/> 75 | <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> 76 | <Component id="t1" alignment="3" min="-2" max="-2" attributes="0"/> 77 | </Group> 78 | <EmptySpace type="separate" max="-2" attributes="0"/> 79 | <Group type="103" groupAlignment="3" attributes="0"> 80 | <Component id="t2" alignment="3" min="-2" max="-2" attributes="0"/> 81 | <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> 82 | </Group> 83 | <EmptySpace type="separate" max="-2" attributes="0"/> 84 | <Group type="103" groupAlignment="3" attributes="0"> 85 | <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> 86 | <Component id="t3" alignment="3" min="-2" max="-2" attributes="0"/> 87 | </Group> 88 | <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> 89 | <Group type="103" groupAlignment="3" attributes="0"> 90 | <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> 91 | <Component id="t4" alignment="3" min="-2" max="-2" attributes="0"/> 92 | </Group> 93 | <EmptySpace type="separate" max="-2" attributes="0"/> 94 | <Group type="103" groupAlignment="3" attributes="0"> 95 | <Component id="t5" alignment="3" min="-2" max="-2" attributes="0"/> 96 | <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> 97 | </Group> 98 | <EmptySpace min="-2" pref="32" max="-2" attributes="0"/> 99 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 100 | <EmptySpace pref="33" max="32767" attributes="0"/> 101 | </Group> 102 | </Group> 103 | </DimensionLayout> 104 | </Layout> 105 | <SubComponents> 106 | <Component class="javax.swing.JTextField" name="jTextField2"> 107 | <Properties> 108 | <Property name="text" type="java.lang.String" value="t1"/> 109 | </Properties> 110 | </Component> 111 | <Component class="javax.swing.JTextField" name="t2"> 112 | <Events> 113 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t2ActionPerformed"/> 114 | </Events> 115 | </Component> 116 | <Component class="javax.swing.JTextField" name="t3"> 117 | </Component> 118 | <Component class="javax.swing.JTextField" name="t4"> 119 | </Component> 120 | <Component class="javax.swing.JTextField" name="t5"> 121 | </Component> 122 | <Component class="javax.swing.JLabel" name="jLabel1"> 123 | <Properties> 124 | <Property name="text" type="java.lang.String" value="Parent Name"/> 125 | </Properties> 126 | </Component> 127 | <Component class="javax.swing.JLabel" name="jLabel2"> 128 | <Properties> 129 | <Property name="text" type="java.lang.String" value="Mobile No"/> 130 | </Properties> 131 | </Component> 132 | <Component class="javax.swing.JLabel" name="jLabel3"> 133 | <Properties> 134 | <Property name="text" type="java.lang.String" value="Email Id"/> 135 | </Properties> 136 | </Component> 137 | <Component class="javax.swing.JLabel" name="jLabel4"> 138 | <Properties> 139 | <Property name="text" type="java.lang.String" value="Address"/> 140 | </Properties> 141 | </Component> 142 | <Component class="javax.swing.JLabel" name="jLabel5"> 143 | <Properties> 144 | <Property name="text" type="java.lang.String" value="proffession"/> 145 | </Properties> 146 | </Component> 147 | <Component class="javax.swing.JTextField" name="t1"> 148 | </Component> 149 | <Component class="javax.swing.JButton" name="jButton1"> 150 | <Properties> 151 | <Property name="text" type="java.lang.String" value="Submit"/> 152 | </Properties> 153 | </Component> 154 | </SubComponents> 155 | </Form> 156 | -------------------------------------------------------------------------------- /src/ParentForm.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | /** 8 | * 9 | * @author tanu 10 | */ 11 | public class ParentForm extends javax.swing.JFrame { 12 | 13 | /** 14 | * Creates new form ParentForm 15 | */ 16 | public ParentForm() { 17 | initComponents(); 18 | } 19 | 20 | /** 21 | * This method is called from within the constructor to initialize the form. 22 | * WARNING: Do NOT modify this code. The content of this method is always 23 | * regenerated by the Form Editor. 24 | */ 25 | @SuppressWarnings("unchecked") 26 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 27 | private void initComponents() { 28 | 29 | jTextField1 = new javax.swing.JTextField(); 30 | jTextField2 = new javax.swing.JTextField(); 31 | t2 = new javax.swing.JTextField(); 32 | t3 = new javax.swing.JTextField(); 33 | t4 = new javax.swing.JTextField(); 34 | t5 = new javax.swing.JTextField(); 35 | jLabel1 = new javax.swing.JLabel(); 36 | jLabel2 = new javax.swing.JLabel(); 37 | jLabel3 = new javax.swing.JLabel(); 38 | jLabel4 = new javax.swing.JLabel(); 39 | jLabel5 = new javax.swing.JLabel(); 40 | t1 = new javax.swing.JTextField(); 41 | jButton1 = new javax.swing.JButton(); 42 | 43 | jTextField1.setText("jTextField1"); 44 | 45 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 46 | 47 | jTextField2.setText("t1"); 48 | 49 | t2.addActionListener(new java.awt.event.ActionListener() { 50 | public void actionPerformed(java.awt.event.ActionEvent evt) { 51 | t2ActionPerformed(evt); 52 | } 53 | }); 54 | 55 | jLabel1.setText("Parent Name"); 56 | 57 | jLabel2.setText("Mobile No"); 58 | 59 | jLabel3.setText("Email Id"); 60 | 61 | jLabel4.setText("Address"); 62 | 63 | jLabel5.setText("proffession"); 64 | 65 | jButton1.setText("Submit"); 66 | 67 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 68 | getContentPane().setLayout(layout); 69 | layout.setHorizontalGroup( 70 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 71 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 72 | .addGap(72, 72, 72) 73 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 74 | .addGroup(layout.createSequentialGroup() 75 | .addGap(0, 0, Short.MAX_VALUE) 76 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE) 77 | .addGap(6, 6, 6)) 78 | .addGroup(layout.createSequentialGroup() 79 | .addGap(10, 10, 10) 80 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 81 | .addComponent(jLabel3) 82 | .addComponent(jLabel2) 83 | .addComponent(jLabel4) 84 | .addComponent(jLabel1) 85 | .addComponent(jLabel5)) 86 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) 87 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 88 | .addComponent(t2, javax.swing.GroupLayout.DEFAULT_SIZE, 165, Short.MAX_VALUE) 89 | .addComponent(t3) 90 | .addComponent(t4) 91 | .addComponent(t5) 92 | .addComponent(t1)) 93 | .addGap(40, 40, 40)) 94 | .addGroup(layout.createSequentialGroup() 95 | .addGap(142, 142, 142) 96 | .addComponent(jButton1) 97 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 98 | ); 99 | layout.setVerticalGroup( 100 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 101 | .addGroup(layout.createSequentialGroup() 102 | .addGap(35, 35, 35) 103 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 104 | .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 105 | .addComponent(jLabel1) 106 | .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 107 | .addGap(18, 18, 18) 108 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 109 | .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 110 | .addComponent(jLabel2)) 111 | .addGap(18, 18, 18) 112 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 113 | .addComponent(jLabel3) 114 | .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 115 | .addGap(23, 23, 23) 116 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 117 | .addComponent(jLabel4) 118 | .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 119 | .addGap(18, 18, 18) 120 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 121 | .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 122 | .addComponent(jLabel5)) 123 | .addGap(32, 32, 32) 124 | .addComponent(jButton1) 125 | .addContainerGap(33, Short.MAX_VALUE)) 126 | ); 127 | 128 | pack(); 129 | }// </editor-fold>//GEN-END:initComponents 130 | 131 | private void t2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_t2ActionPerformed 132 | // TODO add your handling code here: 133 | }//GEN-LAST:event_t2ActionPerformed 134 | 135 | /** 136 | * @param args the command line arguments 137 | */ 138 | public static void main(String args[]) { 139 | /* Set the Nimbus look and feel */ 140 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 141 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 142 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 143 | */ 144 | try { 145 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 146 | if ("Nimbus".equals(info.getName())) { 147 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 148 | break; 149 | } 150 | } 151 | } catch (ClassNotFoundException ex) { 152 | java.util.logging.Logger.getLogger(ParentForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 153 | } catch (InstantiationException ex) { 154 | java.util.logging.Logger.getLogger(ParentForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 155 | } catch (IllegalAccessException ex) { 156 | java.util.logging.Logger.getLogger(ParentForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 157 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 158 | java.util.logging.Logger.getLogger(ParentForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 159 | } 160 | //</editor-fold> 161 | 162 | /* Create and display the form */ 163 | java.awt.EventQueue.invokeLater(new Runnable() { 164 | public void run() { 165 | new ParentForm().setVisible(true); 166 | } 167 | }); 168 | } 169 | 170 | // Variables declaration - do not modify//GEN-BEGIN:variables 171 | private javax.swing.JButton jButton1; 172 | private javax.swing.JLabel jLabel1; 173 | private javax.swing.JLabel jLabel2; 174 | private javax.swing.JLabel jLabel3; 175 | private javax.swing.JLabel jLabel4; 176 | private javax.swing.JLabel jLabel5; 177 | private javax.swing.JTextField jTextField1; 178 | private javax.swing.JTextField jTextField2; 179 | private javax.swing.JTextField t1; 180 | private javax.swing.JTextField t2; 181 | private javax.swing.JTextField t3; 182 | private javax.swing.JTextField t4; 183 | private javax.swing.JTextField t5; 184 | // End of variables declaration//GEN-END:variables 185 | } 186 | -------------------------------------------------------------------------------- /src/LoginForm.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <Properties> 5 | <Property name="defaultCloseOperation" type="int" value="3"/> 6 | </Properties> 7 | <SyntheticProperties> 8 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 9 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 10 | </SyntheticProperties> 11 | <AuxValues> 12 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 13 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 14 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 15 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 16 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 17 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 18 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 19 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 20 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 21 | </AuxValues> 22 | 23 | <Layout> 24 | <DimensionLayout dim="0"> 25 | <Group type="103" groupAlignment="0" attributes="0"> 26 | <Component id="jPanel1" alignment="0" max="32767" attributes="0"/> 27 | </Group> 28 | </DimensionLayout> 29 | <DimensionLayout dim="1"> 30 | <Group type="103" groupAlignment="0" attributes="0"> 31 | <Component id="jPanel1" max="32767" attributes="0"/> 32 | </Group> 33 | </DimensionLayout> 34 | </Layout> 35 | <SubComponents> 36 | <Container class="javax.swing.JPanel" name="jPanel1"> 37 | <Properties> 38 | <Property name="foreground" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 39 | <Color blue="0" green="0" red="66" type="rgb"/> 40 | </Property> 41 | </Properties> 42 | 43 | <Layout class="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout"> 44 | <Property name="useNullLayout" type="boolean" value="false"/> 45 | </Layout> 46 | <SubComponents> 47 | <Component class="javax.swing.JLabel" name="jLabel4"> 48 | <Constraints> 49 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 50 | <AbsoluteConstraints x="135" y="175" width="-1" height="-1"/> 51 | </Constraint> 52 | </Constraints> 53 | </Component> 54 | <Component class="javax.swing.JLabel" name="jLabel3"> 55 | <Properties> 56 | <Property name="text" type="java.lang.String" value="LOGIN FORM"/> 57 | </Properties> 58 | <Constraints> 59 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 60 | <AbsoluteConstraints x="246" y="47" width="-1" height="-1"/> 61 | </Constraint> 62 | </Constraints> 63 | </Component> 64 | <Component class="javax.swing.JLabel" name="jLabel5"> 65 | <Properties> 66 | <Property name="text" type="java.lang.String" value="jLabel5"/> 67 | </Properties> 68 | <Constraints> 69 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 70 | <AbsoluteConstraints x="433" y="282" width="-1" height="-1"/> 71 | </Constraint> 72 | </Constraints> 73 | </Component> 74 | <Component class="javax.swing.JButton" name="jButton2"> 75 | <Properties> 76 | <Property name="text" type="java.lang.String" value="Sign Up"/> 77 | </Properties> 78 | <Events> 79 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> 80 | </Events> 81 | <Constraints> 82 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 83 | <AbsoluteConstraints x="337" y="241" width="-1" height="-1"/> 84 | </Constraint> 85 | </Constraints> 86 | </Component> 87 | <Component class="javax.swing.JButton" name="jButton1"> 88 | <Properties> 89 | <Property name="background" type="java.awt.Color" editor="org.netbeans.beaninfo.editors.ColorEditor"> 90 | <Color blue="ff" green="ff" red="ff" type="rgb"/> 91 | </Property> 92 | <Property name="text" type="java.lang.String" value="Sign In"/> 93 | </Properties> 94 | <Events> 95 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 96 | </Events> 97 | <Constraints> 98 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 99 | <AbsoluteConstraints x="66" y="241" width="-1" height="-1"/> 100 | </Constraint> 101 | </Constraints> 102 | </Component> 103 | <Component class="javax.swing.JLabel" name="jLabel6"> 104 | <Properties> 105 | <Property name="text" type="java.lang.String" value="jLabel6"/> 106 | </Properties> 107 | <Constraints> 108 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 109 | <AbsoluteConstraints x="649" y="115" width="-1" height="-1"/> 110 | </Constraint> 111 | </Constraints> 112 | </Component> 113 | <Component class="javax.swing.JLabel" name="jLabel2"> 114 | <Properties> 115 | <Property name="text" type="java.lang.String" value="PASSWORD"/> 116 | </Properties> 117 | <Constraints> 118 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 119 | <AbsoluteConstraints x="0" y="176" width="-1" height="-1"/> 120 | </Constraint> 121 | </Constraints> 122 | </Component> 123 | <Component class="javax.swing.JTextField" name="t1"> 124 | <Constraints> 125 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 126 | <AbsoluteConstraints x="237" y="112" width="169" height="-1"/> 127 | </Constraint> 128 | </Constraints> 129 | </Component> 130 | <Component class="javax.swing.JLabel" name="jLabel1"> 131 | <Properties> 132 | <Property name="text" type="java.lang.String" value="ID"/> 133 | </Properties> 134 | <Constraints> 135 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 136 | <AbsoluteConstraints x="0" y="115" width="32" height="-1"/> 137 | </Constraint> 138 | </Constraints> 139 | </Component> 140 | <Component class="javax.swing.JLabel" name="jLabel7"> 141 | <Properties> 142 | <Property name="icon" type="javax.swing.Icon" editor="org.netbeans.modules.form.editors2.IconEditor"> 143 | <Image iconType="2" name="C:\Users\Muska\Downloads\WhatsApp Image 2019-11-17 at 11.02.22 AM.jpeg"/> 144 | </Property> 145 | <Property name="text" type="java.lang.String" value="jLabel7"/> 146 | </Properties> 147 | <Constraints> 148 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 149 | <AbsoluteConstraints x="0" y="0" width="674" height="350"/> 150 | </Constraint> 151 | </Constraints> 152 | </Component> 153 | <Component class="javax.swing.JPasswordField" name="t3"> 154 | <Constraints> 155 | <Constraint layoutClass="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout" value="org.netbeans.modules.form.compat2.layouts.DesignAbsoluteLayout$AbsoluteConstraintsDescription"> 156 | <AbsoluteConstraints x="237" y="173" width="169" height="-1"/> 157 | </Constraint> 158 | </Constraints> 159 | </Component> 160 | </SubComponents> 161 | </Container> 162 | </SubComponents> 163 | </Form> 164 | -------------------------------------------------------------------------------- /src/LinkForm.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | 7 | /** 8 | * 9 | * @author tanu 10 | */ 11 | public class LinkForm extends javax.swing.JFrame { 12 | 13 | /** 14 | * Creates new form LinkForm 15 | */ 16 | public LinkForm() { 17 | initComponents(); 18 | } 19 | 20 | /** 21 | * This method is called from within the constructor to initialize the form. 22 | * WARNING: Do NOT modify this code. The content of this method is always 23 | * regenerated by the Form Editor. 24 | */ 25 | @SuppressWarnings("unchecked") 26 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 27 | private void initComponents() { 28 | 29 | jLabel1 = new javax.swing.JLabel(); 30 | jButton1 = new javax.swing.JButton(); 31 | jButton2 = new javax.swing.JButton(); 32 | jButton3 = new javax.swing.JButton(); 33 | jButton4 = new javax.swing.JButton(); 34 | jButton5 = new javax.swing.JButton(); 35 | cDetails = new javax.swing.JButton(); 36 | jButton6 = new javax.swing.JButton(); 37 | 38 | jLabel1.setText("jLabel1"); 39 | 40 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 41 | 42 | jButton1.setText("Adopt"); 43 | jButton1.addActionListener(new java.awt.event.ActionListener() { 44 | public void actionPerformed(java.awt.event.ActionEvent evt) { 45 | jButton1ActionPerformed(evt); 46 | } 47 | }); 48 | 49 | jButton2.setText(" For Staff "); 50 | jButton2.addActionListener(new java.awt.event.ActionListener() { 51 | public void actionPerformed(java.awt.event.ActionEvent evt) { 52 | jButton2ActionPerformed(evt); 53 | } 54 | }); 55 | 56 | jButton3.setText("donation"); 57 | jButton3.addActionListener(new java.awt.event.ActionListener() { 58 | public void actionPerformed(java.awt.event.ActionEvent evt) { 59 | jButton3ActionPerformed(evt); 60 | } 61 | }); 62 | 63 | jButton4.setText("Parent"); 64 | jButton4.addActionListener(new java.awt.event.ActionListener() { 65 | public void actionPerformed(java.awt.event.ActionEvent evt) { 66 | jButton4ActionPerformed(evt); 67 | } 68 | }); 69 | 70 | jButton5.setText("Update"); 71 | jButton5.addActionListener(new java.awt.event.ActionListener() { 72 | public void actionPerformed(java.awt.event.ActionEvent evt) { 73 | jButton5ActionPerformed(evt); 74 | } 75 | }); 76 | 77 | cDetails.setText("For Child Details"); 78 | cDetails.addActionListener(new java.awt.event.ActionListener() { 79 | public void actionPerformed(java.awt.event.ActionEvent evt) { 80 | cDetailsActionPerformed(evt); 81 | } 82 | }); 83 | 84 | jButton6.setText("for admin"); 85 | jButton6.addActionListener(new java.awt.event.ActionListener() { 86 | public void actionPerformed(java.awt.event.ActionEvent evt) { 87 | jButton6ActionPerformed(evt); 88 | } 89 | }); 90 | 91 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 92 | getContentPane().setLayout(layout); 93 | layout.setHorizontalGroup( 94 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 95 | .addGroup(layout.createSequentialGroup() 96 | .addGap(136, 136, 136) 97 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 98 | .addGroup(layout.createSequentialGroup() 99 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 100 | .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE) 101 | .addComponent(jButton2) 102 | .addComponent(jButton4) 103 | .addComponent(jButton3) 104 | .addComponent(jButton5)) 105 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 106 | .addGroup(layout.createSequentialGroup() 107 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 108 | .addComponent(jButton6) 109 | .addComponent(cDetails)) 110 | .addGap(0, 155, Short.MAX_VALUE)))) 111 | ); 112 | layout.setVerticalGroup( 113 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 114 | .addGroup(layout.createSequentialGroup() 115 | .addGap(30, 30, 30) 116 | .addComponent(jButton1) 117 | .addGap(18, 18, 18) 118 | .addComponent(jButton2) 119 | .addGap(18, 18, 18) 120 | .addComponent(jButton3) 121 | .addGap(18, 18, 18) 122 | .addComponent(jButton4) 123 | .addGap(18, 18, 18) 124 | .addComponent(jButton5) 125 | .addGap(18, 18, 18) 126 | .addComponent(cDetails) 127 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 19, Short.MAX_VALUE) 128 | .addComponent(jButton6)) 129 | ); 130 | 131 | pack(); 132 | }// </editor-fold>//GEN-END:initComponents 133 | 134 | private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed 135 | 136 | }//GEN-LAST:event_jButton3ActionPerformed 137 | 138 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 139 | 140 | ChildDetails ch=new ChildDetails(); 141 | ch.setVisible(true); 142 | }//GEN-LAST:event_jButton1ActionPerformed 143 | 144 | private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed 145 | 146 | }//GEN-LAST:event_jButton4ActionPerformed 147 | 148 | private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed 149 | Update up=new Update(); 150 | up.setVisible(true); 151 | }//GEN-LAST:event_jButton5ActionPerformed 152 | 153 | private void cDetailsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cDetailsActionPerformed 154 | 155 | 156 | }//GEN-LAST:event_cDetailsActionPerformed 157 | 158 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed 159 | 160 | }//GEN-LAST:event_jButton2ActionPerformed 161 | 162 | private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed 163 | ShowData sd=new ShowData(); 164 | sd.setVisible(true); 165 | }//GEN-LAST:event_jButton6ActionPerformed 166 | 167 | /** 168 | * @param args the command line arguments 169 | */ 170 | public static void main(String args[]) { 171 | /* Set the Nimbus look and feel */ 172 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 173 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 174 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 175 | */ 176 | try { 177 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 178 | if ("Nimbus".equals(info.getName())) { 179 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 180 | break; 181 | } 182 | } 183 | } catch (ClassNotFoundException ex) { 184 | java.util.logging.Logger.getLogger(LinkForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 185 | } catch (InstantiationException ex) { 186 | java.util.logging.Logger.getLogger(LinkForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 187 | } catch (IllegalAccessException ex) { 188 | java.util.logging.Logger.getLogger(LinkForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 189 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 190 | java.util.logging.Logger.getLogger(LinkForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 191 | } 192 | //</editor-fold> 193 | 194 | /* Create and display the form */ 195 | java.awt.EventQueue.invokeLater(new Runnable() { 196 | public void run() { 197 | new LinkForm().setVisible(true); 198 | } 199 | }); 200 | } 201 | 202 | // Variables declaration - do not modify//GEN-BEGIN:variables 203 | private javax.swing.JButton cDetails; 204 | private javax.swing.JButton jButton1; 205 | private javax.swing.JButton jButton2; 206 | private javax.swing.JButton jButton3; 207 | private javax.swing.JButton jButton4; 208 | private javax.swing.JButton jButton5; 209 | private javax.swing.JButton jButton6; 210 | private javax.swing.JLabel jLabel1; 211 | // End of variables declaration//GEN-END:variables 212 | } 213 | -------------------------------------------------------------------------------- /src/LoginForm.java: -------------------------------------------------------------------------------- 1 | 2 | import java.sql.Connection; 3 | import java.sql.PreparedStatement; 4 | import java.sql.ResultSet; 5 | import java.sql.SQLException; 6 | import java.sql.Statement; 7 | import java.util.logging.Level; 8 | import java.util.logging.Logger; 9 | 10 | /* 11 | * To change this license header, choose License Headers in Project Properties. 12 | * To change this template file, choose Tools | Templates 13 | * and open the template in the editor. 14 | */ 15 | 16 | /** 17 | * 18 | * @author tanu 19 | */ 20 | public class LoginForm extends javax.swing.JFrame { 21 | 22 | /** 23 | * Creates new form LoginForm 24 | */ 25 | private Connection con; 26 | private PreparedStatement ps; 27 | private Statement stmt; 28 | String sql; 29 | public LoginForm() { 30 | initComponents(); 31 | /* con=Data.connect(); 32 | //sql="select from staff where id=? AND password=?"; 33 | try { 34 | ps=con.prepareStatement(sql); 35 | stmt=con.createStatement(); 36 | } catch (Exception ex) { 37 | System.out.println(ex); 38 | }*/ 39 | } 40 | 41 | /** 42 | * This method is called from within the constructor to initialize the form. 43 | * WARNING: Do NOT modify this code. The content of this method is always 44 | * regenerated by the Form Editor. 45 | */ 46 | @SuppressWarnings("unchecked") 47 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 48 | private void initComponents() { 49 | 50 | jPanel1 = new javax.swing.JPanel(); 51 | jLabel4 = new javax.swing.JLabel(); 52 | jLabel3 = new javax.swing.JLabel(); 53 | jLabel5 = new javax.swing.JLabel(); 54 | jButton2 = new javax.swing.JButton(); 55 | jButton1 = new javax.swing.JButton(); 56 | jLabel6 = new javax.swing.JLabel(); 57 | jLabel2 = new javax.swing.JLabel(); 58 | t1 = new javax.swing.JTextField(); 59 | jLabel1 = new javax.swing.JLabel(); 60 | jLabel7 = new javax.swing.JLabel(); 61 | t3 = new javax.swing.JPasswordField(); 62 | 63 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 64 | 65 | jPanel1.setForeground(new java.awt.Color(102, 0, 0)); 66 | jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); 67 | jPanel1.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(135, 175, -1, -1)); 68 | 69 | jLabel3.setText("LOGIN FORM"); 70 | jPanel1.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(246, 47, -1, -1)); 71 | 72 | jLabel5.setText("jLabel5"); 73 | jPanel1.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(433, 282, -1, -1)); 74 | 75 | jButton2.setText("Sign Up"); 76 | jButton2.addActionListener(new java.awt.event.ActionListener() { 77 | public void actionPerformed(java.awt.event.ActionEvent evt) { 78 | jButton2ActionPerformed(evt); 79 | } 80 | }); 81 | jPanel1.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(337, 241, -1, -1)); 82 | 83 | jButton1.setBackground(new java.awt.Color(255, 255, 255)); 84 | jButton1.setText("Sign In"); 85 | jButton1.addActionListener(new java.awt.event.ActionListener() { 86 | public void actionPerformed(java.awt.event.ActionEvent evt) { 87 | jButton1ActionPerformed(evt); 88 | } 89 | }); 90 | jPanel1.add(jButton1, new org.netbeans.lib.awtextra.AbsoluteConstraints(66, 241, -1, -1)); 91 | 92 | jLabel6.setText("jLabel6"); 93 | jPanel1.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(649, 115, -1, -1)); 94 | 95 | jLabel2.setText("PASSWORD"); 96 | jPanel1.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 176, -1, -1)); 97 | jPanel1.add(t1, new org.netbeans.lib.awtextra.AbsoluteConstraints(237, 112, 169, -1)); 98 | 99 | jLabel1.setText("ID"); 100 | jPanel1.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 115, 32, -1)); 101 | 102 | jLabel7.setIcon(new javax.swing.ImageIcon("C:\\Users\\Muska\\Downloads\\WhatsApp Image 2019-11-17 at 11.02.22 AM.jpeg")); // NOI18N 103 | jLabel7.setText("jLabel7"); 104 | jPanel1.add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 674, 350)); 105 | jPanel1.add(t3, new org.netbeans.lib.awtextra.AbsoluteConstraints(237, 173, 169, -1)); 106 | 107 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 108 | getContentPane().setLayout(layout); 109 | layout.setHorizontalGroup( 110 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 111 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 112 | ); 113 | layout.setVerticalGroup( 114 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 115 | .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 116 | ); 117 | 118 | pack(); 119 | }// </editor-fold>//GEN-END:initComponents 120 | 121 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed 122 | 123 | SignUpPage signup=new SignUpPage(); 124 | signup.setVisible(true); 125 | 126 | // TODO add your handling code here: 127 | 128 | }//GEN-LAST:event_jButton2ActionPerformed 129 | 130 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 131 | // TODO add your handling code here: 132 | 133 | String i=t1.getText(); 134 | String p=t3.getText(); 135 | if(i.equals("")||p.equals("")){ 136 | jLabel5.setText("please fill Login ID and Password"); 137 | } 138 | 139 | else{ 140 | con=Data.connect(); 141 | sql="select *from staff where id=? and password=?"; 142 | try { 143 | int id=(Integer.parseInt(i)); 144 | ps=con.prepareStatement(sql); 145 | //stmt=con.createStatement(); 146 | ps.setString(1,i); 147 | ps.setString(2, p); 148 | ResultSet rs=ps.executeQuery(); 149 | boolean b=rs.next(); 150 | if(b==true) 151 | { 152 | 153 | LinkForm lf=new LinkForm(); 154 | lf.setVisible(true); 155 | } 156 | else 157 | { 158 | jLabel5.setText("invalid id and password"); 159 | t1.setText(""); 160 | t3.setText(""); 161 | } 162 | 163 | } catch (Exception ex) { 164 | jLabel6.setText("enter only digits"); 165 | t1.setText(""); 166 | } 167 | 168 | /* if(i.equals("12") && p.equals("123456")) 169 | { 170 | LinkForm lf=new LinkForm(); 171 | lf.setVisible(true); 172 | 173 | }*/ 174 | 175 | } 176 | 177 | }//GEN-LAST:event_jButton1ActionPerformed 178 | 179 | /** 180 | * @param args the command line arguments 181 | */ 182 | public static void main(String args[]) { 183 | /* Set the Nimbus look and feel */ 184 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 185 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 186 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 187 | */ 188 | try { 189 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 190 | if ("Nimbus".equals(info.getName())) { 191 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 192 | break; 193 | } 194 | } 195 | } catch (ClassNotFoundException ex) { 196 | java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 197 | } catch (InstantiationException ex) { 198 | java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 199 | } catch (IllegalAccessException ex) { 200 | java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 201 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 202 | java.util.logging.Logger.getLogger(LoginForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 203 | } 204 | //</editor-fold> 205 | 206 | /* Create and display the form */ 207 | java.awt.EventQueue.invokeLater(new Runnable() { 208 | public void run() { 209 | new LoginForm().setVisible(true); 210 | } 211 | }); 212 | } 213 | 214 | // Variables declaration - do not modify//GEN-BEGIN:variables 215 | private javax.swing.JButton jButton1; 216 | private javax.swing.JButton jButton2; 217 | private javax.swing.JLabel jLabel1; 218 | private javax.swing.JLabel jLabel2; 219 | private javax.swing.JLabel jLabel3; 220 | private javax.swing.JLabel jLabel4; 221 | private javax.swing.JLabel jLabel5; 222 | private javax.swing.JLabel jLabel6; 223 | private javax.swing.JLabel jLabel7; 224 | private javax.swing.JPanel jPanel1; 225 | private javax.swing.JTextField t1; 226 | private javax.swing.JPasswordField t3; 227 | // End of variables declaration//GEN-END:variables 228 | } 229 | -------------------------------------------------------------------------------- /src/SignUpPage.java: -------------------------------------------------------------------------------- 1 | 2 | import java.sql.Connection; 3 | import java.sql.PreparedStatement; 4 | import java.sql.ResultSet; 5 | import java.sql.SQLException; 6 | import java.sql.Statement; 7 | import java.util.logging.Level; 8 | import java.util.logging.Logger; 9 | 10 | /* 11 | * To change this license header, choose License Headers in Project Properties. 12 | * To change this template file, choose Tools | Templates 13 | * and open the template in the editor. 14 | */ 15 | 16 | /** 17 | * 18 | * @author tanu 19 | */ 20 | public class SignUpPage extends javax.swing.JFrame { 21 | 22 | /** 23 | * Creates new form SignUpPage 24 | */ 25 | private Connection con; 26 | private PreparedStatement ps; 27 | LinkForm l; 28 | public SignUpPage() { 29 | initComponents(); 30 | } 31 | 32 | /** 33 | * This method is called from within the constructor to initialize the form. 34 | * WARNING: Do NOT modify this code. The content of this method is always 35 | * regenerated by the Form Editor. 36 | */ 37 | @SuppressWarnings("unchecked") 38 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 39 | private void initComponents() { 40 | 41 | jLabel1 = new javax.swing.JLabel(); 42 | jLabel2 = new javax.swing.JLabel(); 43 | t1 = new javax.swing.JTextField(); 44 | t2 = new javax.swing.JTextField(); 45 | jButton1 = new javax.swing.JButton(); 46 | jLabel3 = new javax.swing.JLabel(); 47 | jLabel4 = new javax.swing.JLabel(); 48 | 49 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 50 | 51 | jLabel1.setText("Id"); 52 | 53 | jLabel2.setText("Create password"); 54 | 55 | jButton1.setText("OK"); 56 | jButton1.addActionListener(new java.awt.event.ActionListener() { 57 | public void actionPerformed(java.awt.event.ActionEvent evt) { 58 | jButton1ActionPerformed(evt); 59 | } 60 | }); 61 | 62 | jLabel3.setText("jLabel3"); 63 | 64 | jLabel4.setText("jLabel4"); 65 | 66 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 67 | getContentPane().setLayout(layout); 68 | layout.setHorizontalGroup( 69 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 70 | .addGroup(layout.createSequentialGroup() 71 | .addGap(79, 79, 79) 72 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 73 | .addGroup(layout.createSequentialGroup() 74 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 75 | .addGroup(layout.createSequentialGroup() 76 | .addComponent(jLabel2) 77 | .addGap(18, 18, 18) 78 | .addComponent(t2)) 79 | .addGroup(layout.createSequentialGroup() 80 | .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) 81 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 47, Short.MAX_VALUE) 82 | .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE))) 83 | .addGap(72, 72, 72)) 84 | .addGroup(layout.createSequentialGroup() 85 | .addGap(97, 97, 97) 86 | .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE) 87 | .addContainerGap()))) 88 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 89 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 90 | .addComponent(jButton1) 91 | .addGap(157, 157, 157)) 92 | .addGroup(layout.createSequentialGroup() 93 | .addGap(104, 104, 104) 94 | .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE) 95 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 96 | ); 97 | layout.setVerticalGroup( 98 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 99 | .addGroup(layout.createSequentialGroup() 100 | .addGap(41, 41, 41) 101 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 102 | .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 103 | .addComponent(jLabel1)) 104 | .addGap(18, 18, 18) 105 | .addComponent(jLabel3) 106 | .addGap(36, 36, 36) 107 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 108 | .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 109 | .addComponent(jLabel2)) 110 | .addGap(54, 54, 54) 111 | .addComponent(jButton1) 112 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) 113 | .addComponent(jLabel4) 114 | .addContainerGap(49, Short.MAX_VALUE)) 115 | ); 116 | 117 | pack(); 118 | }// </editor-fold>//GEN-END:initComponents 119 | 120 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 121 | 122 | String id=t1.getText(); 123 | 124 | String pass=t2.getText(); 125 | if(id.equals("")||pass.equals("")) 126 | { 127 | jLabel4.setText("fill id and password"); 128 | 129 | } 130 | if(pass.length()>8) 131 | { 132 | jLabel4.setText("password at most of 8 digit or cahracter"); 133 | // SignUpPage s=new SignUpPage(); 134 | //s.setVisible(true); 135 | 136 | 137 | } 138 | 139 | 140 | // TODO add your handling code here: 141 | else{ 142 | con=Data.connect(); 143 | String sql=" select *from staff where id=? and password=null "; 144 | try { 145 | ps=con.prepareStatement(sql); 146 | ps.setString(1, id); 147 | 148 | 149 | 150 | ResultSet rs=ps.executeQuery(); 151 | boolean b=rs.next(); 152 | if(b==false) 153 | { 154 | 155 | jLabel3.setText("id is invalid or already exist"); 156 | } 157 | 158 | else{ 159 | 160 | int s=Integer.parseInt((rs.getString(1))); 161 | String sql1="update staff set password=? where id=? "; 162 | ps=con.prepareStatement(sql1); 163 | ps.setString(1,pass); 164 | ps.setString(2,id); 165 | ps.executeUpdate(); 166 | 167 | l=new LinkForm(); 168 | l.setVisible(true); 169 | con.close(); 170 | } 171 | 172 | } 173 | 174 | 175 | 176 | 177 | 178 | catch (Exception ex) { 179 | System.out.println(ex); 180 | } 181 | } 182 | t1.setText(" "); 183 | t2.setText(" "); 184 | }//GEN-LAST:event_jButton1ActionPerformed 185 | 186 | 187 | /** 188 | } * @param args the command line arguments 189 | */ 190 | public static void main(String args[]) { 191 | /* Set the Nimbus look and feel */ 192 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 193 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 194 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 195 | */ 196 | try { 197 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 198 | if ("Nimbus".equals(info.getName())) { 199 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 200 | break; 201 | } 202 | } 203 | } catch (ClassNotFoundException ex) { 204 | java.util.logging.Logger.getLogger(SignUpPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 205 | } catch (InstantiationException ex) { 206 | java.util.logging.Logger.getLogger(SignUpPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 207 | } catch (IllegalAccessException ex) { 208 | java.util.logging.Logger.getLogger(SignUpPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 209 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 210 | java.util.logging.Logger.getLogger(SignUpPage.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 211 | } 212 | //</editor-fold> 213 | 214 | /* Create and display the form */ 215 | java.awt.EventQueue.invokeLater(new Runnable() { 216 | public void run() { 217 | new SignUpPage().setVisible(true); 218 | } 219 | }); 220 | } 221 | 222 | // Variables declaration - do not modify//GEN-BEGIN:variables 223 | private javax.swing.JButton jButton1; 224 | private javax.swing.JLabel jLabel1; 225 | private javax.swing.JLabel jLabel2; 226 | private javax.swing.JLabel jLabel3; 227 | private javax.swing.JLabel jLabel4; 228 | private javax.swing.JTextField t1; 229 | private javax.swing.JTextField t2; 230 | // End of variables declaration//GEN-END:variables 231 | } 232 | -------------------------------------------------------------------------------- /src/DonationForm.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <Properties> 5 | <Property name="defaultCloseOperation" type="int" value="3"/> 6 | </Properties> 7 | <SyntheticProperties> 8 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 9 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 10 | </SyntheticProperties> 11 | <AuxValues> 12 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 13 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 14 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 15 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 16 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 17 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 18 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 19 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 20 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 21 | </AuxValues> 22 | 23 | <Layout> 24 | <DimensionLayout dim="0"> 25 | <Group type="103" groupAlignment="0" attributes="0"> 26 | <Group type="102" alignment="0" attributes="0"> 27 | <EmptySpace min="-2" pref="85" max="-2" attributes="0"/> 28 | <Group type="103" groupAlignment="0" attributes="0"> 29 | <Component id="jLabel1" min="-2" max="-2" attributes="0"/> 30 | <Group type="103" alignment="0" groupAlignment="1" attributes="0"> 31 | <Component id="jLabel6" alignment="0" min="-2" max="-2" attributes="0"/> 32 | <Group type="103" groupAlignment="1" max="-2" attributes="0"> 33 | <Component id="jLabel5" alignment="1" max="32767" attributes="0"/> 34 | <Component id="jLabel7" alignment="1" pref="45" max="32767" attributes="0"/> 35 | </Group> 36 | </Group> 37 | <Component id="jLabel4" min="-2" pref="45" max="-2" attributes="0"/> 38 | <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/> 39 | <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> 40 | <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> 41 | </Group> 42 | <EmptySpace pref="120" max="32767" attributes="0"/> 43 | <Group type="103" groupAlignment="0" max="-2" attributes="0"> 44 | <Component id="t8" pref="175" max="32767" attributes="0"/> 45 | <Component id="t5" pref="175" max="32767" attributes="0"/> 46 | <Component id="t7" pref="175" max="32767" attributes="0"/> 47 | <Component id="t6" alignment="0" pref="175" max="32767" attributes="0"/> 48 | <Component id="t3" pref="175" max="32767" attributes="0"/> 49 | <Component id="t2" pref="175" max="32767" attributes="0"/> 50 | <Component id="t1" pref="175" max="32767" attributes="0"/> 51 | <Component id="t4" alignment="0" max="32767" attributes="0"/> 52 | </Group> 53 | <EmptySpace min="-2" pref="160" max="-2" attributes="0"/> 54 | </Group> 55 | <Group type="102" attributes="0"> 56 | <Group type="103" groupAlignment="0" attributes="0"> 57 | <Group type="102" attributes="0"> 58 | <EmptySpace min="-2" pref="253" max="-2" attributes="0"/> 59 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 60 | </Group> 61 | <Group type="102" alignment="0" attributes="0"> 62 | <EmptySpace min="-2" pref="179" max="-2" attributes="0"/> 63 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 64 | </Group> 65 | </Group> 66 | <EmptySpace max="32767" attributes="0"/> 67 | </Group> 68 | </Group> 69 | </DimensionLayout> 70 | <DimensionLayout dim="1"> 71 | <Group type="103" groupAlignment="0" attributes="0"> 72 | <Group type="102" alignment="0" attributes="0"> 73 | <EmptySpace pref="74" max="32767" attributes="0"/> 74 | <Group type="103" groupAlignment="3" attributes="0"> 75 | <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> 76 | <Component id="t1" alignment="3" min="-2" max="-2" attributes="0"/> 77 | </Group> 78 | <EmptySpace type="separate" max="-2" attributes="0"/> 79 | <Group type="103" groupAlignment="3" attributes="0"> 80 | <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> 81 | <Component id="t2" alignment="3" min="-2" max="-2" attributes="0"/> 82 | </Group> 83 | <EmptySpace type="separate" max="-2" attributes="0"/> 84 | <Group type="103" groupAlignment="3" attributes="0"> 85 | <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> 86 | <Component id="t3" alignment="3" min="-2" max="-2" attributes="0"/> 87 | </Group> 88 | <EmptySpace type="separate" max="-2" attributes="0"/> 89 | <Group type="103" groupAlignment="3" attributes="0"> 90 | <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> 91 | <Component id="t4" alignment="3" min="-2" max="-2" attributes="0"/> 92 | </Group> 93 | <EmptySpace type="separate" max="-2" attributes="0"/> 94 | <Group type="103" groupAlignment="3" attributes="0"> 95 | <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> 96 | <Component id="t5" alignment="3" min="-2" max="-2" attributes="0"/> 97 | </Group> 98 | <EmptySpace type="separate" max="-2" attributes="0"/> 99 | <Group type="103" groupAlignment="3" attributes="0"> 100 | <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> 101 | <Component id="t6" alignment="3" min="-2" max="-2" attributes="0"/> 102 | </Group> 103 | <EmptySpace type="separate" max="-2" attributes="0"/> 104 | <Group type="103" groupAlignment="3" attributes="0"> 105 | <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> 106 | <Component id="t7" alignment="3" min="-2" max="-2" attributes="0"/> 107 | </Group> 108 | <EmptySpace type="separate" max="-2" attributes="0"/> 109 | <Group type="103" groupAlignment="3" attributes="0"> 110 | <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> 111 | <Component id="t8" alignment="3" min="-2" max="-2" attributes="0"/> 112 | </Group> 113 | <EmptySpace min="-2" pref="45" max="-2" attributes="0"/> 114 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 115 | <EmptySpace type="separate" max="-2" attributes="0"/> 116 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 117 | <EmptySpace min="-2" pref="43" max="-2" attributes="0"/> 118 | </Group> 119 | </Group> 120 | </DimensionLayout> 121 | </Layout> 122 | <SubComponents> 123 | <Component class="javax.swing.JLabel" name="jLabel1"> 124 | <Properties> 125 | <Property name="text" type="java.lang.String" value="Account No."/> 126 | </Properties> 127 | </Component> 128 | <Component class="javax.swing.JLabel" name="jLabel2"> 129 | <Properties> 130 | <Property name="text" type="java.lang.String" value="IFSC Code"/> 131 | </Properties> 132 | </Component> 133 | <Component class="javax.swing.JLabel" name="jLabel3"> 134 | <Properties> 135 | <Property name="text" type="java.lang.String" value="Bank Name"/> 136 | </Properties> 137 | </Component> 138 | <Component class="javax.swing.JLabel" name="jLabel4"> 139 | <Properties> 140 | <Property name="text" type="java.lang.String" value="Amount"/> 141 | </Properties> 142 | </Component> 143 | <Component class="javax.swing.JTextField" name="t6"> 144 | </Component> 145 | <Component class="javax.swing.JTextField" name="t7"> 146 | </Component> 147 | <Component class="javax.swing.JTextField" name="t8"> 148 | </Component> 149 | <Component class="javax.swing.JTextField" name="t5"> 150 | <Events> 151 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t5ActionPerformed"/> 152 | </Events> 153 | </Component> 154 | <Component class="javax.swing.JButton" name="jButton1"> 155 | <Properties> 156 | <Property name="text" type="java.lang.String" value="Submit"/> 157 | </Properties> 158 | <Events> 159 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 160 | </Events> 161 | </Component> 162 | <Component class="javax.swing.JLabel" name="jLabel5"> 163 | <Properties> 164 | <Property name="text" type="java.lang.String" value="Name"/> 165 | </Properties> 166 | </Component> 167 | <Component class="javax.swing.JLabel" name="jLabel6"> 168 | <Properties> 169 | <Property name="text" type="java.lang.String" value="Mobile no"/> 170 | </Properties> 171 | </Component> 172 | <Component class="javax.swing.JLabel" name="jLabel7"> 173 | <Properties> 174 | <Property name="text" type="java.lang.String" value="Email Id"/> 175 | </Properties> 176 | </Component> 177 | <Component class="javax.swing.JTextField" name="t1"> 178 | </Component> 179 | <Component class="javax.swing.JTextField" name="t2"> 180 | </Component> 181 | <Component class="javax.swing.JTextField" name="t3"> 182 | </Component> 183 | <Component class="javax.swing.JLabel" name="jLabel8"> 184 | <Properties> 185 | <Property name="text" type="java.lang.String" value="Mode of transfer"/> 186 | </Properties> 187 | </Component> 188 | <Component class="javax.swing.JTextField" name="t4"> 189 | </Component> 190 | <Component class="javax.swing.JLabel" name="jLabel9"> 191 | <Properties> 192 | <Property name="text" type="java.lang.String" value="jLabel9"/> 193 | </Properties> 194 | </Component> 195 | </SubComponents> 196 | </Form> 197 | -------------------------------------------------------------------------------- /src/ChildDetails.java: -------------------------------------------------------------------------------- 1 | 2 | import static com.oracle.jrockit.jfr.ContentType.Bytes; 3 | import java.awt.Image; 4 | import java.awt.Toolkit; 5 | import java.awt.event.ItemEvent; 6 | import java.awt.event.ItemListener; 7 | import java.awt.event.MouseEvent; 8 | import java.awt.event.MouseListener; 9 | import java.sql.Connection; 10 | import java.sql.PreparedStatement; 11 | import java.sql.ResultSet; 12 | import java.sql.ResultSetMetaData; 13 | import java.sql.SQLException; 14 | import java.sql.Statement; 15 | import java.util.logging.Level; 16 | import java.util.logging.Logger; 17 | import javax.swing.ImageIcon; 18 | import javax.swing.JButton; 19 | import javax.swing.JComboBox; 20 | import javax.swing.JLabel; 21 | import javax.swing.JTable; 22 | import javax.swing.ListSelectionModel; 23 | import javax.swing.table.DefaultTableModel; 24 | import javax.swing.table.TableModel; 25 | 26 | /* 27 | * To change this license header, choose License Headers in Project Properties. 28 | * To change this template file, choose Tools | Templates 29 | * and open the template in the editor. 30 | */ 31 | 32 | /** 33 | * 34 | * @author tanu 35 | */ 36 | public class ChildDetails extends javax.swing.JFrame { 37 | 38 | /** 39 | * Creates new form ChildDetails 40 | */ 41 | private Connection con; 42 | private PreparedStatement ps; 43 | // label3 = new JLabel(); 44 | public ChildDetails() { 45 | initComponents(); 46 | con=Data.connect(); 47 | childData(); 48 | 49 | 50 | } 51 | void childData() 52 | { 53 | String sql="select*from child"; 54 | Statement stm; 55 | try { 56 | stm = con.createStatement(); 57 | String[] tableColumnsName={" Id","name","age","class","BloodG","HealthIss","image","Action"}; 58 | DefaultTableModel aModel=(DefaultTableModel)Table1.getModel(); 59 | aModel.setColumnIdentifiers(tableColumnsName); 60 | ResultSet rs= stm.executeQuery(sql); 61 | ResultSetMetaData rsmd=rs.getMetaData(); 62 | int colno=rsmd.getColumnCount(); 63 | 64 | 65 | 66 | while(rs.next()) 67 | { 68 | Object[] obj=new Object[colno]; 69 | for(int i=0;i<colno;i++) 70 | { 71 | obj[i]=rs.getObject(i+1); 72 | // JButton b=new JButton("adopt"); 73 | 74 | } 75 | aModel.addRow(obj); 76 | 77 | } 78 | /* JTable table=new JTable(); 79 | table.setRowSelectionAllowed(true); 80 | if(table.getCellSelectionEnabled()) 81 | { 82 | table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); 83 | int row=table.getSelectedRow(); 84 | System.out.println("this is "+row); 85 | } 86 | Table1.setModel(aModel); 87 | int selectedRowIndex=Table1.getSelectedRow(); 88 | TableModel model=Table1.getModel(); 89 | String id= model.getValueAt(selectedRowIndex,0).toString(); 90 | */ 91 | int i=500; 92 | int j=200; 93 | int k=670; 94 | int l=250; 95 | 96 | ResultSet test = stm.executeQuery("select photo from child "); 97 | System.out.println(test); 98 | if(test.next()) 99 | { 100 | System.out.println("Inside"); 101 | byte[] imagedata = test.getBytes("photo") ; 102 | 103 | ImageIcon icon =new ImageIcon(imagedata); 104 | Image im = icon.getImage(); 105 | Image myImg = im.getScaledInstance(100, 100, Image.SCALE_SMOOTH); 106 | ImageIcon newImage =new ImageIcon(myImg); 107 | System.out.println(newImage); 108 | setVisible(true); 109 | System.out.println("Here"); 110 | JLabel label3; 111 | label3 = new JLabel(); 112 | 113 | label3.setBounds(i,j,k,l); 114 | add(label3); 115 | label3.setIcon(newImage); 116 | i=i+100; 117 | j=j+100; 118 | k=k+100; 119 | l=l+100; 120 | System.out.println("LAST"); 121 | } 122 | else 123 | { 124 | System.out.println("No DAta"); 125 | //JoptionPane.showMessageDialog(null,"No data"); 126 | } 127 | 128 | /// Table1.setModel(aModel); 129 | // int selectedRowIndex=Table1.getSelectedRow(); 130 | // TableModel model=Table1.getModel(); 131 | //String id= model.getValueAt(selectedRowIndex,0).toString(); 132 | // String sql1="Select photo from child where id=id"; 133 | // ResultSet rs1=stm.executeQuery(sql1); 134 | /* while(rs.next()) 135 | { 136 | byte[] b=rs.getBytes("photo"); 137 | ImageIcon image=new ImageIcon(b); 138 | Image im=image.getImage(); 139 | Image myImg=im.getScaledInstance(jLabel3.getWidth(), jLabel3.getHeight(), Image.SCALE_SMOOTH); 140 | ImageIcon newImage=new ImageIcon(myImg); 141 | jLabel3.setIcon(newImage); 142 | 143 | }*/ 144 | //getText(aModel.getValueAdd(selectedRowIndex,0).toString()); 145 | /* while(rs.next()) 146 | { 147 | byte[] img=rs.getBytes("photo"); 148 | Image image =getToolkit().createImage(img); 149 | ImageIcon icon=new ImageIcon(image); 150 | jLabel3.setIcon(icon); 151 | 152 | 153 | 154 | 155 | }*/ 156 | } catch (SQLException ex) { 157 | Logger.getLogger(SelectStaff.class.getName()).log(Level.SEVERE, null, ex); 158 | } 159 | 160 | 161 | } 162 | 163 | /** 164 | * This method is called from within the constructor to initialize the form. 165 | * WARNING: Do NOT modify this code. The content of this method is always 166 | * regenerated by the Form Editor. 167 | */ 168 | @SuppressWarnings("unchecked") 169 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 170 | private void initComponents() { 171 | 172 | jLabel2 = new javax.swing.JLabel(); 173 | jLabel1 = new javax.swing.JLabel(); 174 | jScrollPane1 = new javax.swing.JScrollPane(); 175 | Table1 = new javax.swing.JTable(); 176 | 177 | jLabel2.setText("jLabel2"); 178 | 179 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 180 | 181 | jLabel1.setText("Child Details"); 182 | 183 | Table1.setModel(new javax.swing.table.DefaultTableModel( 184 | new Object [][] { 185 | 186 | }, 187 | new String [] { 188 | "Id", "Name", "Age", "Class", "bloodG", "healthIss", "image", "Action" 189 | } 190 | ) { 191 | Class[] types = new Class [] { 192 | java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Byte.class, java.lang.Object.class 193 | }; 194 | 195 | public Class getColumnClass(int columnIndex) { 196 | return types [columnIndex]; 197 | } 198 | }); 199 | Table1.addMouseListener(new java.awt.event.MouseAdapter() { 200 | public void mouseClicked(java.awt.event.MouseEvent evt) { 201 | Table1MouseClicked(evt); 202 | } 203 | }); 204 | jScrollPane1.setViewportView(Table1); 205 | 206 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 207 | getContentPane().setLayout(layout); 208 | layout.setHorizontalGroup( 209 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 210 | .addGroup(layout.createSequentialGroup() 211 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 212 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 473, javax.swing.GroupLayout.PREFERRED_SIZE) 213 | .addGroup(layout.createSequentialGroup() 214 | .addGap(219, 219, 219) 215 | .addComponent(jLabel1) 216 | .addGap(221, 221, 221))) 217 | .addContainerGap(266, Short.MAX_VALUE)) 218 | ); 219 | layout.setVerticalGroup( 220 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 221 | .addGroup(layout.createSequentialGroup() 222 | .addContainerGap() 223 | .addComponent(jLabel1) 224 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 225 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE) 226 | .addContainerGap(219, Short.MAX_VALUE)) 227 | ); 228 | 229 | pack(); 230 | }// </editor-fold>//GEN-END:initComponents 231 | 232 | private void Table1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_Table1MouseClicked 233 | // TODO add your handling code here: 234 | 235 | }//GEN-LAST:event_Table1MouseClicked 236 | 237 | /** 238 | * @param args the command line arguments 239 | */ 240 | public static void main(String args[]) { 241 | /* Set the Nimbus look and feel */ 242 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 243 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 244 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 245 | */ 246 | try { 247 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 248 | if ("Nimbus".equals(info.getName())) { 249 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 250 | break; 251 | } 252 | } 253 | } catch (ClassNotFoundException ex) { 254 | java.util.logging.Logger.getLogger(ChildDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 255 | } catch (InstantiationException ex) { 256 | java.util.logging.Logger.getLogger(ChildDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 257 | } catch (IllegalAccessException ex) { 258 | java.util.logging.Logger.getLogger(ChildDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 259 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 260 | java.util.logging.Logger.getLogger(ChildDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 261 | } 262 | //</editor-fold> 263 | 264 | /* Create and display the form */ 265 | java.awt.EventQueue.invokeLater(new Runnable() { 266 | public void run() { 267 | new ChildDetails().setVisible(true); 268 | } 269 | }); 270 | } 271 | 272 | // Variables declaration - do not modify//GEN-BEGIN:variables 273 | private javax.swing.JTable Table1; 274 | private javax.swing.JLabel jLabel1; 275 | private javax.swing.JLabel jLabel2; 276 | private javax.swing.JScrollPane jScrollPane1; 277 | // End of variables declaration//GEN-END:variables 278 | 279 | //To change body of generated methods, choose Tools | Templates. 280 | 281 | 282 | -------------------------------------------------------------------------------- /src/StaffForm.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <Properties> 5 | <Property name="defaultCloseOperation" type="int" value="3"/> 6 | </Properties> 7 | <SyntheticProperties> 8 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 9 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 10 | </SyntheticProperties> 11 | <AuxValues> 12 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 13 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 14 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 15 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 16 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 17 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 18 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 19 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 20 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 21 | </AuxValues> 22 | 23 | <Layout> 24 | <DimensionLayout dim="0"> 25 | <Group type="103" groupAlignment="0" attributes="0"> 26 | <Group type="102" alignment="0" attributes="0"> 27 | <EmptySpace min="-2" pref="120" max="-2" attributes="0"/> 28 | <Group type="103" groupAlignment="0" attributes="0"> 29 | <Group type="102" attributes="0"> 30 | <Component id="jLabel5" min="-2" max="-2" attributes="0"/> 31 | <EmptySpace min="102" pref="333" max="32767" attributes="0"/> 32 | </Group> 33 | <Group type="102" alignment="1" attributes="0"> 34 | <Group type="103" groupAlignment="0" attributes="0"> 35 | <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> 36 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> 37 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 38 | <Component id="jLabel6" alignment="0" min="-2" pref="46" max="-2" attributes="0"/> 39 | </Group> 40 | <EmptySpace pref="79" max="32767" attributes="0"/> 41 | <Group type="103" groupAlignment="0" attributes="0"> 42 | <Group type="102" attributes="0"> 43 | <Component id="t6" min="-2" pref="166" max="-2" attributes="0"/> 44 | <EmptySpace max="-2" attributes="0"/> 45 | <Component id="jLabel7" min="-2" max="-2" attributes="0"/> 46 | </Group> 47 | <Group type="103" alignment="0" groupAlignment="0" max="-2" attributes="0"> 48 | <Component id="t3" pref="166" max="32767" attributes="0"/> 49 | <Component id="t1" pref="166" max="32767" attributes="0"/> 50 | <Component id="t2" alignment="0" pref="166" max="32767" attributes="0"/> 51 | </Group> 52 | </Group> 53 | <EmptySpace min="-2" pref="63" max="-2" attributes="0"/> 54 | </Group> 55 | <Group type="102" alignment="1" attributes="0"> 56 | <Group type="103" groupAlignment="1" attributes="0"> 57 | <Group type="102" attributes="0"> 58 | <EmptySpace min="0" pref="0" max="32767" attributes="0"/> 59 | <Component id="t5" min="-2" pref="166" max="-2" attributes="0"/> 60 | </Group> 61 | <Group type="102" attributes="0"> 62 | <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 63 | <EmptySpace max="32767" attributes="0"/> 64 | <Component id="t4" min="-2" pref="166" max="-2" attributes="0"/> 65 | </Group> 66 | </Group> 67 | <EmptySpace min="-2" pref="42" max="-2" attributes="0"/> 68 | </Group> 69 | </Group> 70 | </Group> 71 | <Group type="102" alignment="0" attributes="0"> 72 | <EmptySpace min="-2" pref="189" max="-2" attributes="0"/> 73 | <Group type="103" groupAlignment="0" attributes="0"> 74 | <Group type="102" alignment="0" attributes="0"> 75 | <Component id="jButton1" min="-2" pref="79" max="-2" attributes="0"/> 76 | <EmptySpace min="-2" pref="56" max="-2" attributes="0"/> 77 | <Component id="jButton2" min="-2" max="-2" attributes="0"/> 78 | <EmptySpace pref="87" max="32767" attributes="0"/> 79 | </Group> 80 | <Group type="102" alignment="0" attributes="0"> 81 | <Component id="jLabel8" min="-2" max="-2" attributes="0"/> 82 | <EmptySpace max="32767" attributes="0"/> 83 | <Component id="jLabel10" min="-2" max="-2" attributes="0"/> 84 | <EmptySpace min="-2" pref="28" max="-2" attributes="0"/> 85 | </Group> 86 | </Group> 87 | </Group> 88 | <Group type="102" alignment="1" attributes="0"> 89 | <EmptySpace max="32767" attributes="0"/> 90 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 91 | <EmptySpace min="-2" pref="108" max="-2" attributes="0"/> 92 | </Group> 93 | </Group> 94 | </DimensionLayout> 95 | <DimensionLayout dim="1"> 96 | <Group type="103" groupAlignment="0" attributes="0"> 97 | <Group type="102" alignment="0" attributes="0"> 98 | <EmptySpace min="-2" pref="38" max="-2" attributes="0"/> 99 | <Group type="103" groupAlignment="3" attributes="0"> 100 | <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> 101 | <Component id="t6" alignment="3" min="-2" max="-2" attributes="0"/> 102 | <Component id="jLabel7" alignment="3" min="-2" max="-2" attributes="0"/> 103 | </Group> 104 | <EmptySpace min="-2" pref="3" max="-2" attributes="0"/> 105 | <Group type="103" groupAlignment="3" attributes="0"> 106 | <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> 107 | <Component id="jLabel10" alignment="3" min="-2" max="-2" attributes="0"/> 108 | </Group> 109 | <EmptySpace min="-2" pref="1" max="-2" attributes="0"/> 110 | <Group type="103" groupAlignment="3" attributes="0"> 111 | <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> 112 | <Component id="t1" alignment="3" min="-2" max="-2" attributes="0"/> 113 | </Group> 114 | <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> 115 | <Group type="103" groupAlignment="1" attributes="0"> 116 | <Component id="jLabel2" min="-2" max="-2" attributes="0"/> 117 | <Component id="t2" min="-2" max="-2" attributes="0"/> 118 | </Group> 119 | <EmptySpace min="-2" pref="34" max="-2" attributes="0"/> 120 | <Group type="103" groupAlignment="3" attributes="0"> 121 | <Component id="t3" alignment="3" min="-2" max="-2" attributes="0"/> 122 | <Component id="jLabel3" alignment="3" min="-2" max="-2" attributes="0"/> 123 | </Group> 124 | <EmptySpace min="-2" pref="39" max="-2" attributes="0"/> 125 | <Group type="103" groupAlignment="3" attributes="0"> 126 | <Component id="jLabel4" alignment="3" min="-2" max="-2" attributes="0"/> 127 | <Component id="t4" alignment="3" min="-2" max="-2" attributes="0"/> 128 | </Group> 129 | <EmptySpace pref="13" max="32767" attributes="0"/> 130 | <Group type="103" groupAlignment="3" attributes="0"> 131 | <Component id="jLabel5" alignment="3" min="-2" max="-2" attributes="0"/> 132 | <Component id="t5" alignment="3" min="-2" max="-2" attributes="0"/> 133 | </Group> 134 | <EmptySpace type="separate" max="-2" attributes="0"/> 135 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 136 | <EmptySpace min="-2" pref="13" max="-2" attributes="0"/> 137 | <Group type="103" groupAlignment="3" attributes="0"> 138 | <Component id="jButton1" alignment="3" min="-2" pref="23" max="-2" attributes="0"/> 139 | <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> 140 | </Group> 141 | <EmptySpace max="-2" attributes="0"/> 142 | </Group> 143 | </Group> 144 | </DimensionLayout> 145 | </Layout> 146 | <SubComponents> 147 | <Component class="javax.swing.JLabel" name="jLabel1"> 148 | <Properties> 149 | <Property name="text" type="java.lang.String" value="Name"/> 150 | </Properties> 151 | </Component> 152 | <Component class="javax.swing.JLabel" name="jLabel2"> 153 | <Properties> 154 | <Property name="text" type="java.lang.String" value="Mobile No"/> 155 | </Properties> 156 | </Component> 157 | <Component class="javax.swing.JLabel" name="jLabel3"> 158 | <Properties> 159 | <Property name="text" type="java.lang.String" value="Address"/> 160 | </Properties> 161 | </Component> 162 | <Component class="javax.swing.JTextField" name="t1"> 163 | </Component> 164 | <Component class="javax.swing.JTextField" name="t2"> 165 | <Events> 166 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t2ActionPerformed"/> 167 | </Events> 168 | </Component> 169 | <Component class="javax.swing.JTextField" name="t3"> 170 | <Events> 171 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t3ActionPerformed"/> 172 | </Events> 173 | </Component> 174 | <Component class="javax.swing.JLabel" name="jLabel4"> 175 | <Properties> 176 | <Property name="text" type="java.lang.String" value="Email ID"/> 177 | </Properties> 178 | </Component> 179 | <Component class="javax.swing.JLabel" name="jLabel5"> 180 | <Properties> 181 | <Property name="text" type="java.lang.String" value="Work"/> 182 | </Properties> 183 | </Component> 184 | <Component class="javax.swing.JTextField" name="t4"> 185 | <Events> 186 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t4ActionPerformed"/> 187 | </Events> 188 | </Component> 189 | <Component class="javax.swing.JTextField" name="t5"> 190 | </Component> 191 | <Component class="javax.swing.JButton" name="jButton1"> 192 | <Properties> 193 | <Property name="text" type="java.lang.String" value="Submit"/> 194 | </Properties> 195 | <Events> 196 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 197 | </Events> 198 | </Component> 199 | <Component class="javax.swing.JLabel" name="jLabel6"> 200 | <Properties> 201 | <Property name="text" type="java.lang.String" value="Id"/> 202 | </Properties> 203 | </Component> 204 | <Component class="javax.swing.JTextField" name="t6"> 205 | <Events> 206 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t6ActionPerformed"/> 207 | </Events> 208 | </Component> 209 | <Component class="javax.swing.JLabel" name="jLabel7"> 210 | </Component> 211 | <Component class="javax.swing.JLabel" name="jLabel8"> 212 | <Properties> 213 | <Property name="text" type="java.lang.String" value="jLabel8"/> 214 | </Properties> 215 | </Component> 216 | <Component class="javax.swing.JButton" name="jButton2"> 217 | <Properties> 218 | <Property name="text" type="java.lang.String" value="Update"/> 219 | </Properties> 220 | <Events> 221 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> 222 | </Events> 223 | </Component> 224 | <Component class="javax.swing.JLabel" name="jLabel9"> 225 | <Properties> 226 | <Property name="text" type="java.lang.String" value="jLabel9"/> 227 | </Properties> 228 | </Component> 229 | <Component class="javax.swing.JLabel" name="jLabel10"> 230 | <Properties> 231 | <Property name="text" type="java.lang.String" value="jLabel10"/> 232 | </Properties> 233 | </Component> 234 | </SubComponents> 235 | </Form> 236 | -------------------------------------------------------------------------------- /src/DonationForm.java: -------------------------------------------------------------------------------- 1 | 2 | import java.sql.Connection; 3 | import java.sql.PreparedStatement; 4 | import java.sql.ResultSet; 5 | import java.sql.SQLException; 6 | import java.util.logging.Level; 7 | import java.util.logging.Logger; 8 | 9 | /* 10 | * To change this license header, choose License Headers in Project Properties. 11 | * To change this template file, choose Tools | Templates 12 | * and open the template in the editor. 13 | */ 14 | 15 | /** 16 | * 17 | * @author tanu 18 | */ 19 | public class DonationForm extends javax.swing.JFrame { 20 | 21 | /** 22 | * Creates new form DonationForm 23 | */ 24 | Connection con; 25 | PreparedStatement ps; 26 | public DonationForm() { 27 | initComponents(); 28 | con=Data.connect(); 29 | } 30 | 31 | /** 32 | * This method is called from within the constructor to initialize the form. 33 | * WARNING: Do NOT modify this code. The content of this method is always 34 | * regenerated by the Form Editor. 35 | */ 36 | @SuppressWarnings("unchecked") 37 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 38 | private void initComponents() { 39 | 40 | jLabel1 = new javax.swing.JLabel(); 41 | jLabel2 = new javax.swing.JLabel(); 42 | jLabel3 = new javax.swing.JLabel(); 43 | jLabel4 = new javax.swing.JLabel(); 44 | t6 = new javax.swing.JTextField(); 45 | t7 = new javax.swing.JTextField(); 46 | t8 = new javax.swing.JTextField(); 47 | t5 = new javax.swing.JTextField(); 48 | jButton1 = new javax.swing.JButton(); 49 | jLabel5 = new javax.swing.JLabel(); 50 | jLabel6 = new javax.swing.JLabel(); 51 | jLabel7 = new javax.swing.JLabel(); 52 | t1 = new javax.swing.JTextField(); 53 | t2 = new javax.swing.JTextField(); 54 | t3 = new javax.swing.JTextField(); 55 | jLabel8 = new javax.swing.JLabel(); 56 | t4 = new javax.swing.JTextField(); 57 | jLabel9 = new javax.swing.JLabel(); 58 | 59 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 60 | 61 | jLabel1.setText("Account No."); 62 | 63 | jLabel2.setText("IFSC Code"); 64 | 65 | jLabel3.setText("Bank Name"); 66 | 67 | jLabel4.setText("Amount"); 68 | 69 | t5.addActionListener(new java.awt.event.ActionListener() { 70 | public void actionPerformed(java.awt.event.ActionEvent evt) { 71 | t5ActionPerformed(evt); 72 | } 73 | }); 74 | 75 | jButton1.setText("Submit"); 76 | jButton1.addActionListener(new java.awt.event.ActionListener() { 77 | public void actionPerformed(java.awt.event.ActionEvent evt) { 78 | jButton1ActionPerformed(evt); 79 | } 80 | }); 81 | 82 | jLabel5.setText("Name"); 83 | 84 | jLabel6.setText("Mobile no"); 85 | 86 | jLabel7.setText("Email Id"); 87 | 88 | jLabel8.setText("Mode of transfer"); 89 | 90 | jLabel9.setText("jLabel9"); 91 | 92 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 93 | getContentPane().setLayout(layout); 94 | layout.setHorizontalGroup( 95 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 96 | .addGroup(layout.createSequentialGroup() 97 | .addGap(85, 85, 85) 98 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 99 | .addComponent(jLabel1) 100 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 101 | .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.LEADING) 102 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) 103 | .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 104 | .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, 45, Short.MAX_VALUE))) 105 | .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) 106 | .addComponent(jLabel8) 107 | .addComponent(jLabel2) 108 | .addComponent(jLabel3)) 109 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 120, Short.MAX_VALUE) 110 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 111 | .addComponent(t8, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE) 112 | .addComponent(t5, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE) 113 | .addComponent(t7, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE) 114 | .addComponent(t6, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE) 115 | .addComponent(t3, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE) 116 | .addComponent(t2, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE) 117 | .addComponent(t1, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE) 118 | .addComponent(t4)) 119 | .addGap(160, 160, 160)) 120 | .addGroup(layout.createSequentialGroup() 121 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 122 | .addGroup(layout.createSequentialGroup() 123 | .addGap(253, 253, 253) 124 | .addComponent(jButton1)) 125 | .addGroup(layout.createSequentialGroup() 126 | .addGap(179, 179, 179) 127 | .addComponent(jLabel9))) 128 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 129 | ); 130 | layout.setVerticalGroup( 131 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 132 | .addGroup(layout.createSequentialGroup() 133 | .addContainerGap(74, Short.MAX_VALUE) 134 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 135 | .addComponent(jLabel5) 136 | .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 137 | .addGap(18, 18, 18) 138 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 139 | .addComponent(jLabel7) 140 | .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 141 | .addGap(18, 18, 18) 142 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 143 | .addComponent(jLabel6) 144 | .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 145 | .addGap(18, 18, 18) 146 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 147 | .addComponent(jLabel8) 148 | .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 149 | .addGap(18, 18, 18) 150 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 151 | .addComponent(jLabel3) 152 | .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 153 | .addGap(18, 18, 18) 154 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 155 | .addComponent(jLabel1) 156 | .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 157 | .addGap(18, 18, 18) 158 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 159 | .addComponent(jLabel2) 160 | .addComponent(t7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 161 | .addGap(18, 18, 18) 162 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 163 | .addComponent(jLabel4) 164 | .addComponent(t8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 165 | .addGap(45, 45, 45) 166 | .addComponent(jButton1) 167 | .addGap(18, 18, 18) 168 | .addComponent(jLabel9) 169 | .addGap(43, 43, 43)) 170 | ); 171 | 172 | pack(); 173 | }// </editor-fold>//GEN-END:initComponents 174 | 175 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 176 | // TODO add your handling code here: 177 | 178 | String name=t1.getText(); 179 | String email=t2.getText(); 180 | String mobile=t3.getText(); 181 | String mode=t4.getText(); 182 | String bank=t5.getText(); 183 | String acc=t6.getText(); 184 | String ifsc=t7.getText(); 185 | String amt=t8.getText(); 186 | String sql="insert into Donation values(?,?,?,?,?,?,?,?)"; 187 | try { 188 | 189 | 190 | if(acc.length()==14||ifsc.length()==11||mobile.length()==10) 191 | { 192 | 193 | 194 | ps=con.prepareStatement(sql); 195 | ps.setString(1,name); 196 | ps.setString(2,email); 197 | ps.setString(3,mobile); 198 | ps.setString(4,mode); 199 | ps.setString(5,bank); 200 | ps.setString(6,acc); 201 | ps.setString(7,ifsc); 202 | ps.setInt(8,Integer.parseInt(amt)); 203 | ps.executeUpdate(); 204 | t1.setText(""); 205 | t2.setText(""); 206 | t3.setText(""); 207 | t4.setText(""); 208 | t5.setText(""); 209 | t6.setText(""); 210 | 211 | t7.setText(""); 212 | t8.setText("") ; 213 | } 214 | else 215 | { 216 | 217 | jLabel9.setText("you have to enter proper details"); 218 | 219 | t3.setText(""); 220 | t4.setText(""); 221 | t5.setText(""); 222 | 223 | 224 | } 225 | } catch (SQLException ex) { 226 | jLabel7.setText("please enter correct digit"); 227 | t8.setText("") ; 228 | 229 | } 230 | }//GEN-LAST:event_jButton1ActionPerformed 231 | 232 | private void t5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_t5ActionPerformed 233 | // TODO add your handling code here: 234 | }//GEN-LAST:event_t5ActionPerformed 235 | 236 | /** 237 | * @param args the command line arguments 238 | */ 239 | public static void main(String args[]) { 240 | /* Set the Nimbus look and feel */ 241 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 242 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 243 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 244 | */ 245 | try { 246 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 247 | if ("Nimbus".equals(info.getName())) { 248 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 249 | break; 250 | } 251 | } 252 | } catch (ClassNotFoundException ex) { 253 | java.util.logging.Logger.getLogger(DonationForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 254 | } catch (InstantiationException ex) { 255 | java.util.logging.Logger.getLogger(DonationForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 256 | } catch (IllegalAccessException ex) { 257 | java.util.logging.Logger.getLogger(DonationForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 258 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 259 | java.util.logging.Logger.getLogger(DonationForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 260 | } 261 | //</editor-fold> 262 | 263 | /* Create and display the form */ 264 | java.awt.EventQueue.invokeLater(new Runnable() { 265 | public void run() { 266 | new DonationForm().setVisible(true); 267 | } 268 | }); 269 | } 270 | 271 | // Variables declaration - do not modify//GEN-BEGIN:variables 272 | private javax.swing.JButton jButton1; 273 | private javax.swing.JLabel jLabel1; 274 | private javax.swing.JLabel jLabel2; 275 | private javax.swing.JLabel jLabel3; 276 | private javax.swing.JLabel jLabel4; 277 | private javax.swing.JLabel jLabel5; 278 | private javax.swing.JLabel jLabel6; 279 | private javax.swing.JLabel jLabel7; 280 | private javax.swing.JLabel jLabel8; 281 | private javax.swing.JLabel jLabel9; 282 | private javax.swing.JTextField t1; 283 | private javax.swing.JTextField t2; 284 | private javax.swing.JTextField t3; 285 | private javax.swing.JTextField t4; 286 | private javax.swing.JTextField t5; 287 | private javax.swing.JTextField t6; 288 | private javax.swing.JTextField t7; 289 | private javax.swing.JTextField t8; 290 | // End of variables declaration//GEN-END:variables 291 | } 292 | -------------------------------------------------------------------------------- /src/ChildForm.form: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="UTF-8" ?> 2 | 3 | <Form version="1.9" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo"> 4 | <Properties> 5 | <Property name="defaultCloseOperation" type="int" value="3"/> 6 | </Properties> 7 | <SyntheticProperties> 8 | <SyntheticProperty name="formSizePolicy" type="int" value="1"/> 9 | <SyntheticProperty name="generateCenter" type="boolean" value="false"/> 10 | </SyntheticProperties> 11 | <AuxValues> 12 | <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 13 | <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 14 | <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> 15 | <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> 16 | <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> 17 | <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/> 18 | <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> 19 | <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/> 20 | <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/> 21 | </AuxValues> 22 | 23 | <Layout> 24 | <DimensionLayout dim="0"> 25 | <Group type="103" groupAlignment="0" attributes="0"> 26 | <Group type="102" attributes="0"> 27 | <EmptySpace min="-2" pref="105" max="-2" attributes="0"/> 28 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 29 | <EmptySpace min="-2" pref="56" max="-2" attributes="0"/> 30 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 31 | <EmptySpace pref="368" max="32767" attributes="0"/> 32 | </Group> 33 | <Group type="102" alignment="0" attributes="0"> 34 | <EmptySpace min="-2" pref="92" max="-2" attributes="0"/> 35 | <Group type="103" groupAlignment="0" attributes="0"> 36 | <Component id="jLabel1" alignment="0" min="-2" max="-2" attributes="0"/> 37 | <Component id="jLabel3" alignment="0" min="-2" max="-2" attributes="0"/> 38 | <Component id="jLabel4" alignment="0" min="-2" max="-2" attributes="0"/> 39 | <Component id="jLabel5" alignment="0" min="-2" max="-2" attributes="0"/> 40 | <Component id="jLabel2" alignment="0" min="-2" max="-2" attributes="0"/> 41 | <Component id="jLabel8" alignment="0" min="-2" max="-2" attributes="0"/> 42 | <Component id="t7" min="-2" max="-2" attributes="0"/> 43 | </Group> 44 | <EmptySpace min="-2" pref="82" max="-2" attributes="0"/> 45 | <Group type="103" groupAlignment="0" max="-2" attributes="0"> 46 | <Component id="t3" alignment="0" max="32767" attributes="0"/> 47 | <Component id="t2" alignment="0" max="32767" attributes="0"/> 48 | <Component id="t4" alignment="0" max="32767" attributes="0"/> 49 | <Component id="t5" alignment="0" max="32767" attributes="0"/> 50 | <Component id="t6" pref="183" max="32767" attributes="0"/> 51 | <Component id="jButton2" min="-2" max="-2" attributes="0"/> 52 | <Component id="t1" max="32767" attributes="0"/> 53 | </Group> 54 | <Group type="103" groupAlignment="0" attributes="0"> 55 | <Group type="102" attributes="0"> 56 | <EmptySpace max="32767" attributes="0"/> 57 | <Component id="jDesktopPane1" min="-2" max="-2" attributes="0"/> 58 | <EmptySpace min="-2" pref="48" max="-2" attributes="0"/> 59 | </Group> 60 | <Group type="102" alignment="0" attributes="0"> 61 | <EmptySpace min="-2" pref="50" max="-2" attributes="0"/> 62 | <Component id="jLabel6" min="-2" max="-2" attributes="0"/> 63 | <EmptySpace max="32767" attributes="0"/> 64 | </Group> 65 | </Group> 66 | </Group> 67 | </Group> 68 | </DimensionLayout> 69 | <DimensionLayout dim="1"> 70 | <Group type="103" groupAlignment="0" attributes="0"> 71 | <Group type="102" alignment="0" attributes="0"> 72 | <EmptySpace max="-2" attributes="0"/> 73 | <Group type="103" groupAlignment="3" attributes="0"> 74 | <Component id="jLabel8" alignment="3" min="-2" max="-2" attributes="0"/> 75 | <Component id="t1" alignment="3" min="-2" max="-2" attributes="0"/> 76 | <Component id="jLabel6" alignment="3" min="-2" max="-2" attributes="0"/> 77 | </Group> 78 | <Group type="103" groupAlignment="0" attributes="0"> 79 | <Group type="102" attributes="0"> 80 | <EmptySpace max="-2" attributes="0"/> 81 | <Group type="103" groupAlignment="3" attributes="0"> 82 | <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/> 83 | <Component id="t2" alignment="3" min="-2" max="-2" attributes="0"/> 84 | </Group> 85 | <EmptySpace type="separate" max="-2" attributes="0"/> 86 | <Group type="103" groupAlignment="3" attributes="0"> 87 | <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/> 88 | <Component id="t3" alignment="3" min="-2" max="-2" attributes="0"/> 89 | </Group> 90 | <EmptySpace min="-2" pref="26" max="-2" attributes="0"/> 91 | <Group type="103" groupAlignment="0" attributes="0"> 92 | <Component id="t4" min="-2" max="-2" attributes="0"/> 93 | <Component id="jLabel3" min="-2" max="-2" attributes="0"/> 94 | </Group> 95 | <Group type="103" groupAlignment="0" attributes="0"> 96 | <Group type="102" attributes="0"> 97 | <EmptySpace min="-2" pref="20" max="-2" attributes="0"/> 98 | <Component id="jLabel4" min="-2" max="-2" attributes="0"/> 99 | </Group> 100 | <Group type="102" alignment="0" attributes="0"> 101 | <EmptySpace type="separate" max="-2" attributes="0"/> 102 | <Component id="t5" min="-2" max="-2" attributes="0"/> 103 | </Group> 104 | </Group> 105 | <Group type="103" groupAlignment="0" attributes="0"> 106 | <Group type="102" attributes="0"> 107 | <Group type="103" groupAlignment="0" attributes="0"> 108 | <Group type="102" attributes="0"> 109 | <EmptySpace min="-2" pref="23" max="-2" attributes="0"/> 110 | <Component id="jLabel5" min="-2" max="-2" attributes="0"/> 111 | </Group> 112 | <Group type="102" alignment="0" attributes="0"> 113 | <EmptySpace type="separate" max="-2" attributes="0"/> 114 | <Component id="t6" min="-2" max="-2" attributes="0"/> 115 | </Group> 116 | </Group> 117 | <EmptySpace min="-2" pref="22" max="-2" attributes="0"/> 118 | <Group type="103" groupAlignment="3" attributes="0"> 119 | <Component id="jButton2" alignment="3" min="-2" max="-2" attributes="0"/> 120 | <Component id="t7" alignment="3" min="-2" max="-2" attributes="0"/> 121 | </Group> 122 | </Group> 123 | <Group type="102" alignment="0" attributes="0"> 124 | <EmptySpace min="-2" pref="10" max="-2" attributes="0"/> 125 | <Component id="jDesktopPane1" min="-2" max="-2" attributes="0"/> 126 | </Group> 127 | </Group> 128 | <EmptySpace pref="12" max="32767" attributes="0"/> 129 | <Component id="jButton1" min="-2" max="-2" attributes="0"/> 130 | <EmptySpace min="-2" pref="76" max="-2" attributes="0"/> 131 | </Group> 132 | <Group type="102" alignment="1" attributes="0"> 133 | <EmptySpace max="32767" attributes="0"/> 134 | <Component id="jLabel9" min="-2" max="-2" attributes="0"/> 135 | <EmptySpace min="-2" pref="63" max="-2" attributes="0"/> 136 | </Group> 137 | </Group> 138 | </Group> 139 | </Group> 140 | </DimensionLayout> 141 | </Layout> 142 | <SubComponents> 143 | <Component class="javax.swing.JLabel" name="jLabel1"> 144 | <Properties> 145 | <Property name="text" type="java.lang.String" value="Name"/> 146 | </Properties> 147 | </Component> 148 | <Component class="javax.swing.JLabel" name="jLabel2"> 149 | <Properties> 150 | <Property name="text" type="java.lang.String" value="Age"/> 151 | </Properties> 152 | </Component> 153 | <Component class="javax.swing.JLabel" name="jLabel3"> 154 | <Properties> 155 | <Property name="text" type="java.lang.String" value="Class"/> 156 | </Properties> 157 | </Component> 158 | <Component class="javax.swing.JLabel" name="jLabel4"> 159 | <Properties> 160 | <Property name="text" type="java.lang.String" value="Blood Group"/> 161 | </Properties> 162 | </Component> 163 | <Component class="javax.swing.JTextField" name="t2"> 164 | <Events> 165 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t2ActionPerformed"/> 166 | </Events> 167 | </Component> 168 | <Component class="javax.swing.JTextField" name="t3"> 169 | <Events> 170 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t3ActionPerformed"/> 171 | </Events> 172 | </Component> 173 | <Component class="javax.swing.JTextField" name="t4"> 174 | <Events> 175 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t4ActionPerformed"/> 176 | </Events> 177 | </Component> 178 | <Component class="javax.swing.JTextField" name="t5"> 179 | <Events> 180 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t5ActionPerformed"/> 181 | </Events> 182 | </Component> 183 | <Component class="javax.swing.JLabel" name="jLabel5"> 184 | <Properties> 185 | <Property name="text" type="java.lang.String" value="Health Issue"/> 186 | </Properties> 187 | </Component> 188 | <Component class="javax.swing.JTextField" name="t6"> 189 | <Events> 190 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="t6ActionPerformed"/> 191 | </Events> 192 | </Component> 193 | <Component class="javax.swing.JButton" name="jButton1"> 194 | <Properties> 195 | <Property name="text" type="java.lang.String" value="Submit"/> 196 | </Properties> 197 | <Events> 198 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton1ActionPerformed"/> 199 | </Events> 200 | </Component> 201 | <Component class="javax.swing.JButton" name="jButton2"> 202 | <Properties> 203 | <Property name="text" type="java.lang.String" value="upload"/> 204 | </Properties> 205 | <Events> 206 | <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="jButton2ActionPerformed"/> 207 | </Events> 208 | </Component> 209 | <Container class="javax.swing.JDesktopPane" name="jDesktopPane1"> 210 | <Properties> 211 | <Property name="maximumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> 212 | <Dimension value="[208, 212]"/> 213 | </Property> 214 | <Property name="minimumSize" type="java.awt.Dimension" editor="org.netbeans.beaninfo.editors.DimensionEditor"> 215 | <Dimension value="[208, 212]"/> 216 | </Property> 217 | </Properties> 218 | 219 | <Layout> 220 | <DimensionLayout dim="0"> 221 | <Group type="103" groupAlignment="0" attributes="0"> 222 | <Group type="102" alignment="0" attributes="0"> 223 | <EmptySpace max="-2" attributes="0"/> 224 | <Component id="jLabel7" min="-2" pref="115" max="-2" attributes="0"/> 225 | <EmptySpace max="32767" attributes="0"/> 226 | </Group> 227 | </Group> 228 | </DimensionLayout> 229 | <DimensionLayout dim="1"> 230 | <Group type="103" groupAlignment="0" attributes="0"> 231 | <Group type="102" alignment="0" attributes="0"> 232 | <EmptySpace max="-2" attributes="0"/> 233 | <Component id="jLabel7" min="-2" pref="121" max="-2" attributes="0"/> 234 | <EmptySpace max="32767" attributes="0"/> 235 | </Group> 236 | </Group> 237 | </DimensionLayout> 238 | </Layout> 239 | <SubComponents> 240 | <Component class="javax.swing.JLabel" name="jLabel7"> 241 | <Properties> 242 | <Property name="text" type="java.lang.String" value="jLabel7"/> 243 | </Properties> 244 | </Component> 245 | </SubComponents> 246 | </Container> 247 | <Component class="javax.swing.JLabel" name="jLabel8"> 248 | <Properties> 249 | <Property name="text" type="java.lang.String" value="Id"/> 250 | </Properties> 251 | </Component> 252 | <Component class="javax.swing.JTextField" name="t1"> 253 | </Component> 254 | <Component class="javax.swing.JTextField" name="t7"> 255 | <Properties> 256 | <Property name="text" type="java.lang.String" value="jTextField1"/> 257 | </Properties> 258 | </Component> 259 | <Component class="javax.swing.JLabel" name="jLabel6"> 260 | <Properties> 261 | <Property name="text" type="java.lang.String" value="jLabel6"/> 262 | </Properties> 263 | </Component> 264 | <Component class="javax.swing.JLabel" name="jLabel9"> 265 | <Properties> 266 | <Property name="text" type="java.lang.String" value="jLabel9"/> 267 | </Properties> 268 | </Component> 269 | </SubComponents> 270 | </Form> 271 | -------------------------------------------------------------------------------- /src/ChildForm.java: -------------------------------------------------------------------------------- 1 | import java.io.ByteArrayOutputStream; 2 | import java.io.File; 3 | import java.io.FileInputStream; 4 | import java.sql.Connection; 5 | import java.sql.PreparedStatement; 6 | import java.sql.SQLException; 7 | import java.util.logging.Level; 8 | import java.util.logging.Logger; 9 | import javax.swing.ImageIcon; 10 | import javax.swing.JFileChooser; 11 | import javax.swing.JOptionPane; 12 | 13 | /* 14 | * To change this license header, choose License Headers in Project Properties. 15 | * To change this template file, choose Tools | Templates 16 | * and open the template in the editor. 17 | */ 18 | 19 | /** 20 | * 21 | * @author tanu 22 | */ 23 | public class ChildForm extends javax.swing.JFrame { 24 | private Connection con; 25 | private PreparedStatement ps; 26 | /** 27 | * Creates new form ChildForm 28 | */ 29 | 30 | byte[] photo=null; 31 | String filename=null; 32 | public ChildForm() { 33 | initComponents(); 34 | con=Data.connect(); 35 | 36 | } 37 | 38 | /** 39 | * This method is called from within the constructor to initialize the form. 40 | * WARNING: Do NOT modify this code. The content of this method is always 41 | * regenerated by the Form Editor. 42 | */ 43 | @SuppressWarnings("unchecked") 44 | // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 45 | private void initComponents() { 46 | 47 | jLabel1 = new javax.swing.JLabel(); 48 | jLabel2 = new javax.swing.JLabel(); 49 | jLabel3 = new javax.swing.JLabel(); 50 | jLabel4 = new javax.swing.JLabel(); 51 | t2 = new javax.swing.JTextField(); 52 | t3 = new javax.swing.JTextField(); 53 | t4 = new javax.swing.JTextField(); 54 | t5 = new javax.swing.JTextField(); 55 | jLabel5 = new javax.swing.JLabel(); 56 | t6 = new javax.swing.JTextField(); 57 | jButton1 = new javax.swing.JButton(); 58 | jButton2 = new javax.swing.JButton(); 59 | jDesktopPane1 = new javax.swing.JDesktopPane(); 60 | jLabel7 = new javax.swing.JLabel(); 61 | jLabel8 = new javax.swing.JLabel(); 62 | t1 = new javax.swing.JTextField(); 63 | t7 = new javax.swing.JTextField(); 64 | jLabel6 = new javax.swing.JLabel(); 65 | jLabel9 = new javax.swing.JLabel(); 66 | 67 | setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); 68 | 69 | jLabel1.setText("Name"); 70 | 71 | jLabel2.setText("Age"); 72 | 73 | jLabel3.setText("Class"); 74 | 75 | jLabel4.setText("Blood Group"); 76 | 77 | t2.addActionListener(new java.awt.event.ActionListener() { 78 | public void actionPerformed(java.awt.event.ActionEvent evt) { 79 | t2ActionPerformed(evt); 80 | } 81 | }); 82 | 83 | t3.addActionListener(new java.awt.event.ActionListener() { 84 | public void actionPerformed(java.awt.event.ActionEvent evt) { 85 | t3ActionPerformed(evt); 86 | } 87 | }); 88 | 89 | t4.addActionListener(new java.awt.event.ActionListener() { 90 | public void actionPerformed(java.awt.event.ActionEvent evt) { 91 | t4ActionPerformed(evt); 92 | } 93 | }); 94 | 95 | t5.addActionListener(new java.awt.event.ActionListener() { 96 | public void actionPerformed(java.awt.event.ActionEvent evt) { 97 | t5ActionPerformed(evt); 98 | } 99 | }); 100 | 101 | jLabel5.setText("Health Issue"); 102 | 103 | t6.addActionListener(new java.awt.event.ActionListener() { 104 | public void actionPerformed(java.awt.event.ActionEvent evt) { 105 | t6ActionPerformed(evt); 106 | } 107 | }); 108 | 109 | jButton1.setText("Submit"); 110 | jButton1.addActionListener(new java.awt.event.ActionListener() { 111 | public void actionPerformed(java.awt.event.ActionEvent evt) { 112 | jButton1ActionPerformed(evt); 113 | } 114 | }); 115 | 116 | jButton2.setText("upload"); 117 | jButton2.addActionListener(new java.awt.event.ActionListener() { 118 | public void actionPerformed(java.awt.event.ActionEvent evt) { 119 | jButton2ActionPerformed(evt); 120 | } 121 | }); 122 | 123 | jDesktopPane1.setMaximumSize(new java.awt.Dimension(208, 212)); 124 | jDesktopPane1.setMinimumSize(new java.awt.Dimension(208, 212)); 125 | 126 | jLabel7.setText("jLabel7"); 127 | 128 | jDesktopPane1.setLayer(jLabel7, javax.swing.JLayeredPane.DEFAULT_LAYER); 129 | 130 | javax.swing.GroupLayout jDesktopPane1Layout = new javax.swing.GroupLayout(jDesktopPane1); 131 | jDesktopPane1.setLayout(jDesktopPane1Layout); 132 | jDesktopPane1Layout.setHorizontalGroup( 133 | jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 134 | .addGroup(jDesktopPane1Layout.createSequentialGroup() 135 | .addContainerGap() 136 | .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE) 137 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 138 | ); 139 | jDesktopPane1Layout.setVerticalGroup( 140 | jDesktopPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 141 | .addGroup(jDesktopPane1Layout.createSequentialGroup() 142 | .addContainerGap() 143 | .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE) 144 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 145 | ); 146 | 147 | jLabel8.setText("Id"); 148 | 149 | t7.setText("jTextField1"); 150 | 151 | jLabel6.setText("jLabel6"); 152 | 153 | jLabel9.setText("jLabel9"); 154 | 155 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); 156 | getContentPane().setLayout(layout); 157 | layout.setHorizontalGroup( 158 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 159 | .addGroup(layout.createSequentialGroup() 160 | .addGap(105, 105, 105) 161 | .addComponent(jLabel9) 162 | .addGap(56, 56, 56) 163 | .addComponent(jButton1) 164 | .addContainerGap(368, Short.MAX_VALUE)) 165 | .addGroup(layout.createSequentialGroup() 166 | .addGap(92, 92, 92) 167 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 168 | .addComponent(jLabel1) 169 | .addComponent(jLabel3) 170 | .addComponent(jLabel4) 171 | .addComponent(jLabel5) 172 | .addComponent(jLabel2) 173 | .addComponent(jLabel8) 174 | .addComponent(t7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 175 | .addGap(82, 82, 82) 176 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) 177 | .addComponent(t3) 178 | .addComponent(t2) 179 | .addComponent(t4) 180 | .addComponent(t5) 181 | .addComponent(t6, javax.swing.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE) 182 | .addComponent(jButton2) 183 | .addComponent(t1)) 184 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 185 | .addGroup(layout.createSequentialGroup() 186 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 187 | .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 188 | .addGap(48, 48, 48)) 189 | .addGroup(layout.createSequentialGroup() 190 | .addGap(50, 50, 50) 191 | .addComponent(jLabel6) 192 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) 193 | ); 194 | layout.setVerticalGroup( 195 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 196 | .addGroup(layout.createSequentialGroup() 197 | .addContainerGap() 198 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 199 | .addComponent(jLabel8) 200 | .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 201 | .addComponent(jLabel6)) 202 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 203 | .addGroup(layout.createSequentialGroup() 204 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 205 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 206 | .addComponent(jLabel1) 207 | .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 208 | .addGap(18, 18, 18) 209 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 210 | .addComponent(jLabel2) 211 | .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 212 | .addGap(26, 26, 26) 213 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 214 | .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 215 | .addComponent(jLabel3)) 216 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 217 | .addGroup(layout.createSequentialGroup() 218 | .addGap(20, 20, 20) 219 | .addComponent(jLabel4)) 220 | .addGroup(layout.createSequentialGroup() 221 | .addGap(18, 18, 18) 222 | .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 223 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 224 | .addGroup(layout.createSequentialGroup() 225 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 226 | .addGroup(layout.createSequentialGroup() 227 | .addGap(23, 23, 23) 228 | .addComponent(jLabel5)) 229 | .addGroup(layout.createSequentialGroup() 230 | .addGap(18, 18, 18) 231 | .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 232 | .addGap(22, 22, 22) 233 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 234 | .addComponent(jButton2) 235 | .addComponent(t7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 236 | .addGroup(layout.createSequentialGroup() 237 | .addGap(10, 10, 10) 238 | .addComponent(jDesktopPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 239 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE) 240 | .addComponent(jButton1) 241 | .addGap(76, 76, 76)) 242 | .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() 243 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 244 | .addComponent(jLabel9) 245 | .addGap(63, 63, 63)))) 246 | ); 247 | 248 | pack(); 249 | }// </editor-fold>//GEN-END:initComponents 250 | 251 | private void t3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_t3ActionPerformed 252 | 253 | }//GEN-LAST:event_t3ActionPerformed 254 | 255 | private void t2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_t2ActionPerformed 256 | 257 | }//GEN-LAST:event_t2ActionPerformed 258 | 259 | private void t4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_t4ActionPerformed 260 | 261 | }//GEN-LAST:event_t4ActionPerformed 262 | 263 | private void t5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_t5ActionPerformed 264 | 265 | }//GEN-LAST:event_t5ActionPerformed 266 | 267 | private void t6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_t6ActionPerformed 268 | 269 | }//GEN-LAST:event_t6ActionPerformed 270 | 271 | private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed 272 | JFileChooser chooser=new JFileChooser(); 273 | chooser.showOpenDialog(null); 274 | File f=chooser.getSelectedFile(); 275 | jLabel7.setIcon(new ImageIcon(f.toString())); 276 | filename =f.getAbsolutePath(); 277 | 278 | t7.setText(filename); 279 | try{ 280 | 281 | File image=new File(filename); 282 | FileInputStream fis=new FileInputStream(image); 283 | ByteArrayOutputStream bos=new ByteArrayOutputStream(); 284 | byte[] buf=new byte[2024]; 285 | for(int n;(n=fis.read(buf))!=-1;) 286 | { 287 | bos.write(buf,0,n); 288 | } 289 | photo=bos.toByteArray(); 290 | }catch(Exception e) 291 | { 292 | JOptionPane.showMessageDialog(null,e); 293 | } 294 | }//GEN-LAST:event_jButton2ActionPerformed 295 | 296 | private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed 297 | String sql="insert into child values(?,?,?,?,?,?,?)"; 298 | String id=t1.getText(); 299 | String name=t2.getText(); 300 | String age=t3.getText(); 301 | String stand=t4.getText(); 302 | String blood=t5.getText(); 303 | String health=t6.getText(); 304 | try { 305 | if( name.equals("")||blood.equals("")||health.equals("") ||id.equals("")||age.equals("") ) 306 | { 307 | jLabel9.setText("please fill all the information"); 308 | } 309 | if(id.length()>6) 310 | { 311 | jLabel6.setText("please enter atmost 6 digit"); 312 | } 313 | 314 | 315 | 316 | else{ 317 | ps=con.prepareStatement(sql); 318 | int idno=(Integer.parseInt(id)); 319 | ps.setInt(1,Integer.parseInt(id)); 320 | ps.setString(2,name); 321 | ps.setInt(3,Integer.parseInt(age)); 322 | ps.setString(4,stand); 323 | ps.setString(5,blood); 324 | ps.setString(6,health); 325 | ps.setBytes(7,photo); 326 | ps.execute(); 327 | t1.setText(""); 328 | t2.setText(""); 329 | t3.setText(""); 330 | t4.setText(""); 331 | t5.setText(""); 332 | t6.setText(""); 333 | t7.setText(""); 334 | //jLabel7.setText(""); 335 | } 336 | } catch (Exception ex) { 337 | //System.out.println(ex); 338 | jLabel6.setText("Please Enter only digits"); 339 | } 340 | 341 | 342 | }//GEN-LAST:event_jButton1ActionPerformed 343 | 344 | /** 345 | * @param args the command line arguments 346 | */ 347 | public static void main(String args[]) { 348 | /* Set the Nimbus look and feel */ 349 | //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> 350 | /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. 351 | * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 352 | */ 353 | try { 354 | for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { 355 | if ("Nimbus".equals(info.getName())) { 356 | javax.swing.UIManager.setLookAndFeel(info.getClassName()); 357 | break; 358 | } 359 | } 360 | } catch (ClassNotFoundException ex) { 361 | java.util.logging.Logger.getLogger(ChildForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 362 | } catch (InstantiationException ex) { 363 | java.util.logging.Logger.getLogger(ChildForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 364 | } catch (IllegalAccessException ex) { 365 | java.util.logging.Logger.getLogger(ChildForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 366 | } catch (javax.swing.UnsupportedLookAndFeelException ex) { 367 | java.util.logging.Logger.getLogger(ChildForm.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); 368 | } 369 | //</editor-fold> 370 | 371 | /* Create and display the form */ 372 | java.awt.EventQueue.invokeLater(new Runnable() { 373 | public void run() { 374 | new ChildForm().setVisible(true); 375 | } 376 | }); 377 | } 378 | 379 | // Variables declaration - do not modify//GEN-BEGIN:variables 380 | private javax.swing.JButton jButton1; 381 | private javax.swing.JButton jButton2; 382 | private javax.swing.JDesktopPane jDesktopPane1; 383 | private javax.swing.JLabel jLabel1; 384 | private javax.swing.JLabel jLabel2; 385 | private javax.swing.JLabel jLabel3; 386 | private javax.swing.JLabel jLabel4; 387 | private javax.swing.JLabel jLabel5; 388 | private javax.swing.JLabel jLabel6; 389 | private javax.swing.JLabel jLabel7; 390 | private javax.swing.JLabel jLabel8; 391 | private javax.swing.JLabel jLabel9; 392 | private javax.swing.JTextField t1; 393 | private javax.swing.JTextField t2; 394 | private javax.swing.JTextField t3; 395 | private javax.swing.JTextField t4; 396 | private javax.swing.JTextField t5; 397 | private javax.swing.JTextField t6; 398 | private javax.swing.JTextField t7; 399 | // End of variables declaration//GEN-END:variables 400 | } 401 | --------------------------------------------------------------------------------