Java tutorial
import com.itextpdf.text.Chunk; import javax.swing.JFrame; import javax.swing.JOptionPane; import java.io.FileNotFoundException; import java.io.FileOutputStream; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.Element; import com.itextpdf.text.Font; import com.itextpdf.text.FontFactory; import com.itextpdf.text.Paragraph; import com.itextpdf.text.pdf.PdfWriter; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.UIManager; /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /* * user_details.java * * Created on 16 Jun, 2016, 10:49:41 AM */ /** * * @author Parul Prakriti and Kushashwa Ravi Shrimali */ public class user_details extends javax.swing.JFrame { /** Creates new form user_details */ public user_details() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { personal_details = new javax.swing.JFrame(); jLabel2 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); txt7 = new javax.swing.JTextField(); txt6 = new javax.swing.JTextField(); rb1 = new javax.swing.JCheckBox(); rb2 = new javax.swing.JCheckBox(); txt4 = new javax.swing.JTextField(); txt3 = new javax.swing.JTextField(); txt1 = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); txt2 = new javax.swing.JTextField(); txt5 = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); txt8 = new javax.swing.JTextArea(); jLabel11 = new javax.swing.JLabel(); jButton2 = new javax.swing.JButton(); edu_exp_details = new javax.swing.JFrame(); jLabel12 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jLabel14 = new javax.swing.JLabel(); jLabel15 = new javax.swing.JLabel(); jLabel16 = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); ta1 = new javax.swing.JTextArea(); jScrollPane4 = new javax.swing.JScrollPane(); ta4 = new javax.swing.JTextArea(); jScrollPane3 = new javax.swing.JScrollPane(); ta3 = new javax.swing.JTextArea(); jScrollPane5 = new javax.swing.JScrollPane(); ta2 = new javax.swing.JTextArea(); jButton3 = new javax.swing.JButton(); acheivements = new javax.swing.JFrame(); jLabel17 = new javax.swing.JLabel(); jLabel18 = new javax.swing.JLabel(); jScrollPane6 = new javax.swing.JScrollPane(); taAcc2 = new javax.swing.JTextArea(); jScrollPane7 = new javax.swing.JScrollPane(); taAcc = new javax.swing.JTextArea(); jButton4 = new javax.swing.JButton(); references = new javax.swing.JFrame(); jButton5 = new javax.swing.JButton(); jLabel23 = new javax.swing.JLabel(); refcb = new javax.swing.JComboBox(); jLabel19 = new javax.swing.JLabel(); Who_are_we = new javax.swing.JFrame(); jLabel24 = new javax.swing.JLabel(); jButton6 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jMenuBar1 = new javax.swing.JMenuBar(); Home_Menu = new javax.swing.JMenu(); New = new javax.swing.JMenuItem(); Exit = new javax.swing.JMenuItem(); Aboutus_Menu = new javax.swing.JMenu(); We = new javax.swing.JMenuItem(); personal_details.setMinimumSize(new java.awt.Dimension(765, 540)); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel2.setText("First Name"); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel4.setText("Date of Birth (dd/mm/yyyy)"); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel3.setText("Father's/Gardian's Name"); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel7.setText("Gender"); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel8.setText("Marital Status"); jLabel9.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel9.setText("Contact No."); jLabel10.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel10.setText("Permanent Address"); rb1.setText("Male"); rb2.setText("Female"); rb2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { rb2ActionPerformed(evt); } }); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel5.setText("Age"); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel6.setText("Last Name"); txt8.setColumns(20); txt8.setRows(5); jScrollPane1.setViewportView(txt8); jLabel11.setFont(new java.awt.Font("AR CENA", 1, 24)); // NOI18N jLabel11.setForeground(new java.awt.Color(0, 204, 153)); jLabel11.setText("Input Your Personal Details"); jButton2.setFont(new java.awt.Font("AR CENA", 1, 18)); // NOI18N jButton2.setForeground(new java.awt.Color(204, 0, 0)); jButton2.setText("Save Details and Proceed"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); javax.swing.GroupLayout personal_detailsLayout = new javax.swing.GroupLayout( personal_details.getContentPane()); personal_details.getContentPane().setLayout(personal_detailsLayout); personal_detailsLayout.setHorizontalGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(personal_detailsLayout.createSequentialGroup().addGap(23, 23, 23) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(47, 47, 47) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(personal_detailsLayout.createSequentialGroup() .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txt7).addComponent(txt6) .addGroup(personal_detailsLayout.createSequentialGroup() .addComponent(rb1) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(rb2)) .addComponent(txt4).addComponent(txt3).addComponent(txt1, javax.swing.GroupLayout.DEFAULT_SIZE, 158, Short.MAX_VALUE)) .addGap(69, 69, 69) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5).addComponent(jLabel6)) .addGap(41, 41, 41).addGroup( personal_detailsLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txt2).addComponent(txt5, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE))) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 479, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(65, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, personal_detailsLayout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, personal_detailsLayout.createSequentialGroup().addComponent(jLabel11) .addGap(268, 268, 268)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, personal_detailsLayout .createSequentialGroup().addComponent(jButton2).addGap(276, 276, 276))))); personal_detailsLayout.setVerticalGroup( personal_detailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(personal_detailsLayout.createSequentialGroup().addGap(27, 27, 27) .addComponent(jLabel11).addGap(35, 35, 35) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(txt1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6).addComponent(txt2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txt3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup( personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txt4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5) .addComponent(txt5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(rb1).addComponent(rb2)) .addGap(18, 18, 18) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txt6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txt7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(personal_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18).addComponent(jButton2).addContainerGap(30, Short.MAX_VALUE))); edu_exp_details.setMinimumSize(new java.awt.Dimension(765, 550)); jLabel12.setText("Details about past Employment"); jLabel13.setText("Present Position and Company"); jLabel14.setFont(new java.awt.Font("AR CENA", 1, 18)); // NOI18N jLabel14.setForeground(new java.awt.Color(51, 204, 0)); jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel14.setText("Input your Education and Experience Details"); jLabel15.setText( "<html> <body> Education Details- <P><I> (Input your educational qualification with year of passing and Institution) </I> </P> </body> </html>"); jLabel16.setText("Key skills and Responsibilities"); ta1.setColumns(20); ta1.setRows(5); jScrollPane2.setViewportView(ta1); ta4.setColumns(20); ta4.setRows(5); jScrollPane4.setViewportView(ta4); ta3.setColumns(20); ta3.setRows(5); jScrollPane3.setViewportView(ta3); ta2.setColumns(20); ta2.setRows(5); jScrollPane5.setViewportView(ta2); jButton3.setFont(new java.awt.Font("AR CENA", 1, 18)); // NOI18N jButton3.setForeground(new java.awt.Color(204, 0, 0)); jButton3.setText("Save and Proceed"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); javax.swing.GroupLayout edu_exp_detailsLayout = new javax.swing.GroupLayout( edu_exp_details.getContentPane()); edu_exp_details.getContentPane().setLayout(edu_exp_detailsLayout); edu_exp_detailsLayout.setHorizontalGroup(edu_exp_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(edu_exp_detailsLayout.createSequentialGroup().addGap(52, 52, 52) .addGroup(edu_exp_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(edu_exp_detailsLayout.createSequentialGroup() .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 210, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(edu_exp_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(edu_exp_detailsLayout.createSequentialGroup() .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 181, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .addGroup(edu_exp_detailsLayout.createSequentialGroup() .addGroup(edu_exp_detailsLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 501, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(edu_exp_detailsLayout.createSequentialGroup() .addGroup(edu_exp_detailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 224, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(42, 42, 42) .addGroup(edu_exp_detailsLayout.createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE) .addComponent(jScrollPane4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE) .addComponent(jScrollPane3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE) .addComponent(jScrollPane5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 235, Short.MAX_VALUE)))) .addGap(35, 35, 35))))) .addGroup(edu_exp_detailsLayout .createSequentialGroup().addGap(197, 197, 197).addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(191, Short.MAX_VALUE))); edu_exp_detailsLayout .setVerticalGroup( edu_exp_detailsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(edu_exp_detailsLayout.createSequentialGroup().addContainerGap() .addComponent(jLabel14, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(edu_exp_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(43, 43, 43) .addGroup(edu_exp_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(30, 30, 30) .addGroup(edu_exp_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 53, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(24, 24, 24) .addGroup(edu_exp_detailsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel16, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 18, Short.MAX_VALUE) .addComponent(jButton3).addContainerGap())); acheivements.setMinimumSize(new java.awt.Dimension(700, 420)); jLabel17.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel17.setText("On-job Training/Workshop/Seminars"); jLabel18.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel18.setText("Major Accomplishments"); taAcc2.setColumns(20); taAcc2.setRows(5); jScrollPane6.setViewportView(taAcc2); taAcc.setColumns(20); taAcc.setRows(5); jScrollPane7.setViewportView(taAcc); jButton4.setFont(new java.awt.Font("AR CENA", 1, 18)); // NOI18N jButton4.setForeground(new java.awt.Color(204, 0, 0)); jButton4.setText("Save and Procced"); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); javax.swing.GroupLayout acheivementsLayout = new javax.swing.GroupLayout(acheivements.getContentPane()); acheivements.getContentPane().setLayout(acheivementsLayout); acheivementsLayout.setHorizontalGroup(acheivementsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 684, Short.MAX_VALUE) .addGroup(acheivementsLayout.createSequentialGroup().addContainerGap() .addGroup(acheivementsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(acheivementsLayout.createSequentialGroup().addGroup(acheivementsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel17, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel18, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE)) .addGap(68, 68, 68) .addGroup(acheivementsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 387, Short.MAX_VALUE) .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 387, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, acheivementsLayout.createSequentialGroup() .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(233, 233, 233))))); acheivementsLayout.setVerticalGroup(acheivementsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 354, Short.MAX_VALUE) .addGroup(acheivementsLayout.createSequentialGroup().addGroup(acheivementsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(acheivementsLayout.createSequentialGroup().addGap(27, 27, 27).addComponent( jLabel18, javax.swing.GroupLayout.PREFERRED_SIZE, 46, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(acheivementsLayout.createSequentialGroup().addGap(37, 37, 37).addComponent( jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(acheivementsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(acheivementsLayout.createSequentialGroup().addGap(44, 44, 44) .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(acheivementsLayout.createSequentialGroup().addGap(34, 34, 34) .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(49, 49, 49).addComponent(jButton4) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); references.setMinimumSize(new java.awt.Dimension(764, 506)); jButton5.setFont(new java.awt.Font("AR CENA", 1, 18)); // NOI18N jButton5.setForeground(new java.awt.Color(204, 0, 0)); jButton5.setText("Save as PDF"); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); jLabel23.setFont(new java.awt.Font("AR CENA", 1, 24)); // NOI18N jLabel23.setForeground(new java.awt.Color(0, 102, 255)); jLabel23.setText("REFERENCES"); refcb.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "none", "1", "2", "3", "4", "5" })); refcb.addMouseListener(new java.awt.event.MouseAdapter() { public void mousePressed(java.awt.event.MouseEvent evt) { refcbMousePressed(evt); } }); refcb.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { refcbActionPerformed(evt); } }); jLabel19.setFont(new java.awt.Font("Andalus", 1, 14)); // NOI18N jLabel19.setText("Choose no. of references you want to provide :"); javax.swing.GroupLayout referencesLayout = new javax.swing.GroupLayout(references.getContentPane()); references.getContentPane().setLayout(referencesLayout); referencesLayout.setHorizontalGroup(referencesLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(referencesLayout.createSequentialGroup().addGap(43, 43, 43).addComponent(jLabel19) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 74, Short.MAX_VALUE) .addComponent(refcb, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(126, 126, 126)) .addGroup(referencesLayout.createSequentialGroup() .addGroup(referencesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(referencesLayout.createSequentialGroup().addGap(208, 208, 208) .addComponent(jButton5, javax.swing.GroupLayout.PREFERRED_SIZE, 264, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(referencesLayout.createSequentialGroup().addGap(272, 272, 272) .addComponent(jLabel23, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); referencesLayout.setVerticalGroup(referencesLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(referencesLayout.createSequentialGroup().addContainerGap().addComponent(jLabel23) .addGap(51, 51, 51) .addGroup(referencesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(refcb, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel19)) .addGap(117, 117, 117).addComponent(jButton5).addContainerGap(133, Short.MAX_VALUE))); Who_are_we.setMinimumSize(new java.awt.Dimension(635, 381)); Who_are_we.setPreferredSize(new java.awt.Dimension(635, 385)); jLabel24.setText( "<Html> <body style=\"font-size: 13px;\"> <center> <H1 style=\"color:blue; \"> ABOUT US</H1> </center> <p>We are a group of two students, who love doing the things with an aim to gain knowledge and experience. The down to Earth programmers (means beginners) include: <ul> <li> Kushashwa Ravi Shrimali</li> <li> Parul Prakriti </li> </ul> </p> <p> We have tried our level best to make this program easy to use for the users. We'll appreciate your feedback and are looking forward for it. </p> <br> <p> For feedback, suggestions and queries, feel free to contact us at: cvnow001@gmail.com </p> </br> </body> </html>"); jButton6.setText("<html> <body style=\"font-size:12px;\"> <b> BACK </b> </body> </HTML>"); jButton6.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton6ActionPerformed(evt); } }); javax.swing.GroupLayout Who_are_weLayout = new javax.swing.GroupLayout(Who_are_we.getContentPane()); Who_are_we.getContentPane().setLayout(Who_are_weLayout); Who_are_weLayout.setHorizontalGroup(Who_are_weLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(Who_are_weLayout.createSequentialGroup() .addGroup(Who_are_weLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(Who_are_weLayout.createSequentialGroup().addGap(264, 264, 264) .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(Who_are_weLayout.createSequentialGroup().addGap(32, 32, 32).addComponent( jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 573, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(30, Short.MAX_VALUE))); Who_are_weLayout.setVerticalGroup(Who_are_weLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(Who_are_weLayout.createSequentialGroup() .addComponent(jLabel24, javax.swing.GroupLayout.PREFERRED_SIZE, 296, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE) .addComponent(jButton6, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setMinimumSize(new java.awt.Dimension(764, 506)); jLabel1.setText( "<HTML> <body> <H1 style=\"color: red; font-size: 20px;\"> <B><center>CV-NOW</center> </B> </H1> <br><p style=\"font-size: 15px; color: black;\"> The <b>CV-NOW</b> allows you to build your resume in lesser time than what would take you to type the whole CV. It's smooth and portable. Follow the following instructions: </br> <br> <ul style=\"font-size: 12px; color: blue;\"> <li> Install Java (latest version recommended), if not installed. </li> <li> Enter the required information in the given fields. </li> <li> The CV-Now is compatible with the size it opens with. Prefer not to resize it to a smaller one. </li> <li> For any help/feedback/suggestions, contact us at </li> </ul> </p> <br><p style=\"color: red; font-family: verdana; font-size:15px;\"> <strong> Credits: </strong> </br> <ul style=\"color:blue; font-family: verdana; font-size: 14px;\"> <li> Kushashwa Ravi Shrimali </li> <li> Parul Prakriti </li> </body> </HTML>"); jButton1.setBackground(new java.awt.Color(153, 255, 255)); jButton1.setFont(new java.awt.Font("AR CENA", 1, 24)); // NOI18N jButton1.setForeground(new java.awt.Color(0, 204, 0)); jButton1.setText("START!"); jButton1.setOpaque(false); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); Home_Menu.setText("Home "); New.setText("New"); New.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { NewActionPerformed(evt); } }); Home_Menu.add(New); Exit.setText("Exit"); Exit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ExitActionPerformed(evt); } }); Home_Menu.add(Exit); jMenuBar1.add(Home_Menu); Aboutus_Menu.setText("About Us"); We.setText("Who are we?"); We.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { WeActionPerformed(evt); } }); Aboutus_Menu.add(We); jMenuBar1.add(Aboutus_Menu); setJMenuBar(jMenuBar1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGap(35, 35, 35) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 688, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(41, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 314, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(213, 213, 213))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 356, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 29, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(38, 38, 38))); pack(); }// </editor-fold>//GEN-END:initComponents String fname, lname, age, fthername, dob, gender, maritalS, contactNo, pa, edu_details, present_comp, past_emp; String key_responsibility, accomplishments, training; String[] ref = new String[5]; int refno, counter; private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed dispose(); personal_details.setVisible(true); }//GEN-LAST:event_jButton1ActionPerformed private void rb2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rb2ActionPerformed // TODO add your handling code here: }//GEN-LAST:event_rb2ActionPerformed private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed fname = txt1.getText().toUpperCase(); lname = txt2.getText().toUpperCase(); fthername = txt3.getText(); dob = txt4.getText(); age = txt5.getText(); if (rb1.isSelected() == true) { gender = rb1.getText(); } else { gender = rb2.getText(); } maritalS = txt6.getText(); contactNo = txt7.getText(); pa = txt8.getText(); counter = 1; if (counter == 1) { if (fname.equals("")) { JOptionPane.showMessageDialog(null, "You have not filled in your first name which is mandatory. Kindly check it again."); counter++; } if (lname.equals("")) { JOptionPane.showMessageDialog(null, "You have not filled in your last name which is mandatory. Kindly check it again."); counter++; } if (dob.equals("")) { JOptionPane.showMessageDialog(null, "You have not filled in your date of birth which is mandatory. Kindly check it again."); counter++; } if (contactNo.equals("")) { JOptionPane.showMessageDialog(null, "You have not filled in your contact number which is mandatory. Kindly check it again."); counter++; } if (pa.equals("")) { JOptionPane.showMessageDialog(null, "You have not filled in your permanent address which is mandatory. Kindly check it again."); counter++; } } if (counter == 1) { int option = JOptionPane.showConfirmDialog(null, "Are you are you want to save and proceed? If you procced, The data will be permanently saved and you can't change it later."); if (option == 0) { personal_details.dispose(); edu_exp_details.setVisible(true); } else { JOptionPane.showMessageDialog(null, "Okay! You can edit your Information"); } } }//GEN-LAST:event_jButton2ActionPerformed private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed edu_details = ta1.getText(); present_comp = ta2.getText(); past_emp = ta3.getText(); key_responsibility = ta4.getText(); int option = JOptionPane.showConfirmDialog(null, "Are you are you want to save and proceed? If you procced, The data will be permanently saved and you can't change it later."); if (option == 0) { edu_exp_details.dispose(); acheivements.setVisible(true); } else { JOptionPane.showMessageDialog(null, "Okay! You can edit your Information."); } }//GEN-LAST:event_jButton3ActionPerformed private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed accomplishments = taAcc.getText(); training = taAcc2.getText(); int option = JOptionPane.showConfirmDialog(null, "Are you are you want to save and proceed? If you procced, The data will be permanently saved and you can't change it later."); if (option == 0) { acheivements.dispose(); references.setVisible(true); } else { JOptionPane.showMessageDialog(null, "Okay! You can edit your Information."); } }//GEN-LAST:event_jButton4ActionPerformed private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed int option = JOptionPane.showConfirmDialog(null, "Are you sure?"); if (option == 0) { Document document = new Document(); PdfWriter writer; try { try { writer = PdfWriter.getInstance(document, new FileOutputStream("Your_Resume.pdf")); } catch (FileNotFoundException ex) { Logger.getLogger(user_details.class.getName()).log(Level.SEVERE, null, ex); } Font fontdesign1 = FontFactory.getFont("Times-Roman", 20, Font.BOLD); Font fontdesign2 = FontFactory.getFont("Times-Roman", 10, Font.ITALIC); Font fontdesign4 = FontFactory.getFont("Times-Roman", 12, Font.BOLD); Font fontdesign3 = FontFactory.getFont("Times-Roman", 11); document.open(); Paragraph namepara = new Paragraph(fname + " " + lname, fontdesign1); namepara.setAlignment(Element.ALIGN_CENTER); document.add(namepara); document.add(Chunk.NEWLINE); if (edu_details.equals("") || edu_details.equals("-")) { } else { Paragraph eduTitle = new Paragraph("EDUCATIONAL QUALIFICATION:", fontdesign4); document.add(eduTitle); Paragraph edupara = new Paragraph(edu_details, fontdesign3); document.add(edupara); } document.add(Chunk.NEWLINE); if (present_comp.equals("") || present_comp.equals("-")) { } else { Paragraph Present_compTitle = new Paragraph("CURRENT COMPANY AND POSITION:", fontdesign4); document.add(Present_compTitle); Paragraph Present_compPara = new Paragraph(present_comp, fontdesign3); document.add(Present_compPara); } document.add(Chunk.NEWLINE); if (past_emp.equals("") || past_emp.equals("-")) { } else { Paragraph Past_compTitle = new Paragraph("PAST EMPLOYMENT DETAILS:", fontdesign4); document.add(Past_compTitle); Paragraph Past_compPara = new Paragraph(past_emp, fontdesign3); document.add(Past_compPara); } document.add(Chunk.NEWLINE); if (key_responsibility.equals("") || key_responsibility.equals("-")) { } else { Paragraph KeyTitle = new Paragraph("KEY RESPONSIBILITIES: ", fontdesign4); document.add(KeyTitle); Paragraph Keypara = new Paragraph(key_responsibility, fontdesign3); document.add(Keypara); } document.add(Chunk.NEWLINE); if (accomplishments.equals("") || accomplishments.equals("-")) { } else { Paragraph AccTitle = new Paragraph("ACCOMPLISHMENTS AND ACHIEVEMENTS:", fontdesign4); document.add(AccTitle); Paragraph Accpara = new Paragraph(accomplishments, fontdesign3); document.add(Accpara); } document.add(Chunk.NEWLINE); if (training.equals("") || training.equals("-")) { } else { Paragraph TrainingTitle = new Paragraph("On-Job TRAININGS/SEMINARS/WORKSHOPS:", fontdesign4); document.add(TrainingTitle); Paragraph Trainingpara = new Paragraph(training, fontdesign3); document.add(Trainingpara); } document.add(Chunk.NEWLINE); Paragraph RefTitle = new Paragraph("REFERENCES:", fontdesign4); document.add(RefTitle); for (int i = 0; i < refno; i++) { Paragraph refpara = new Paragraph(i + 1 + "." + ref[i], fontdesign3); document.add(refpara); } document.add(Chunk.NEWLINE); document.add(Chunk.NEWLINE); Paragraph contactpara = new Paragraph("PHONE: " + contactNo, fontdesign2); document.add(contactpara); if (fthername.equals("") || fthername.equals("-")) { } else { Paragraph fthrnamepara = new Paragraph("FATHER'S NAME: " + fthername, fontdesign2); document.add(fthrnamepara); } Paragraph dobpara = new Paragraph("DOB: " + dob, fontdesign2); document.add(dobpara); Paragraph addresspara = new Paragraph("PERMANENT ADDRESS: " + pa, fontdesign2); document.add(addresspara); document.close(); } catch (DocumentException ex) { Logger.getLogger(user_details.class.getName()).log(Level.SEVERE, null, ex); } references.dispose(); new user_details().setVisible(true); JOptionPane.showMessageDialog(null, "Congratulations! Your resume has been created. Kindly check the directory."); } else { JOptionPane.showMessageDialog(null, "Okay! You can edit your Information."); } }//GEN-LAST:event_jButton5ActionPerformed private void refcbActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_refcbActionPerformed String refstr = (String) refcb.getSelectedItem(); int option = JOptionPane.showConfirmDialog(null, " Are you sure that you want to give " + refstr + " references"); refno = Integer.parseInt(refstr); if (option == 0) { for (int i = 1; i <= refno; i++) { ref[i] = JOptionPane.showInputDialog("Input reference- " + i); } JOptionPane.showMessageDialog(null, "Click on Save as PDF now! "); } else { JOptionPane.showMessageDialog(null, "You can choose other option."); } }//GEN-LAST:event_refcbActionPerformed private void NewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_NewActionPerformed dispose(); new user_details().setVisible(true); }//GEN-LAST:event_NewActionPerformed private void ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ExitActionPerformed System.exit(0); }//GEN-LAST:event_ExitActionPerformed private void WeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_WeActionPerformed dispose(); Who_are_we.setVisible(true); }//GEN-LAST:event_WeActionPerformed private void refcbMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_refcbMousePressed // TODO add your handling code here: }//GEN-LAST:event_refcbMousePressed private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed // TODO add your handling code here: Who_are_we.dispose(); new user_details().setVisible(true); }//GEN-LAST:event_jButton6ActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { try { // setTheme(String themeName, String licenseKey, String logoString) com.jtattoo.plaf.acryl.AcrylLookAndFeel.setTheme("Green", "INSERT YOUR LICENSE KEY HERE", "my company"); // select the Look and Feel UIManager.setLookAndFeel("com.jtattoo.plaf.acryl.AcrylLookAndFeel"); // start the demo application new SimpleThemesDemo(); } catch (Exception ex) { ex.printStackTrace(); } java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new user_details().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JMenu Aboutus_Menu; private javax.swing.JMenuItem Exit; private javax.swing.JMenu Home_Menu; private javax.swing.JMenuItem New; private javax.swing.JMenuItem We; private javax.swing.JFrame Who_are_we; private javax.swing.JFrame acheivements; private javax.swing.JFrame edu_exp_details; private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JButton jButton4; private javax.swing.JButton jButton5; private javax.swing.JButton jButton6; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel10; private javax.swing.JLabel jLabel11; private javax.swing.JLabel jLabel12; private javax.swing.JLabel jLabel13; private javax.swing.JLabel jLabel14; private javax.swing.JLabel jLabel15; private javax.swing.JLabel jLabel16; private javax.swing.JLabel jLabel17; private javax.swing.JLabel jLabel18; private javax.swing.JLabel jLabel19; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel23; private javax.swing.JLabel jLabel24; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JLabel jLabel9; private javax.swing.JMenuBar jMenuBar1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JScrollPane jScrollPane4; private javax.swing.JScrollPane jScrollPane5; private javax.swing.JScrollPane jScrollPane6; private javax.swing.JScrollPane jScrollPane7; private javax.swing.JFrame personal_details; private javax.swing.JCheckBox rb1; private javax.swing.JCheckBox rb2; private javax.swing.JComboBox refcb; private javax.swing.JFrame references; private javax.swing.JTextArea ta1; private javax.swing.JTextArea ta2; private javax.swing.JTextArea ta3; private javax.swing.JTextArea ta4; private javax.swing.JTextArea taAcc; private javax.swing.JTextArea taAcc2; private javax.swing.JTextField txt1; private javax.swing.JTextField txt2; private javax.swing.JTextField txt3; private javax.swing.JTextField txt4; private javax.swing.JTextField txt5; private javax.swing.JTextField txt6; private javax.swing.JTextField txt7; private javax.swing.JTextArea txt8; // End of variables declaration//GEN-END:variables }