Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Mar 17th, 2010  |  syntax: Java  |  size: 39.33 KB  |  hits: 107  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*
  2.  * To change this template, choose Tools | Templates
  3.  * and open the template in the editor.
  4.  */
  5.  
  6. /*
  7.  * jContactMainScreen.java
  8.  *
  9.  * Created on 17-Mar-2010, 12:47:48 PM
  10.  */
  11. /**
  12.  *
  13.  * @author Guorui
  14.  */
  15. public class jContactMainScreen extends javax.swing.JFrame {
  16.  
  17.     /** Creates new form jContactMainScreen */
  18.     public jContactMainScreen() {
  19.         initComponents();
  20.     }
  21.  
  22.     /** This method is called from within the constructor to
  23.      * initialize the form.
  24.      * WARNING: Do NOT modify this code. The content of this method is
  25.      * always regenerated by the Form Editor.
  26.      */
  27.     @SuppressWarnings("unchecked")
  28.     // <editor-fold defaultstate="collapsed" desc="Generated Code">
  29.     private void initComponents() {
  30.  
  31.         newName = new javax.swing.JFrame();
  32.         newNameMessage = new javax.swing.JLabel();
  33.         newNameTextField = new javax.swing.JTextField();
  34.         newNameOK = new javax.swing.JButton();
  35.         jScrollPane1 = new javax.swing.JScrollPane();
  36.         contactList = new javax.swing.JList();
  37.         jTabbedPane1 = new javax.swing.JTabbedPane();
  38.         tabContact = new javax.swing.JPanel();
  39.         tabContactFirstNameLabel = new javax.swing.JLabel();
  40.         tabContactPersonalEmailLabel = new javax.swing.JLabel();
  41.         tabContactLastNameLabel = new javax.swing.JLabel();
  42.         tabContactHomePhoneLabel = new javax.swing.JLabel();
  43.         tabContactWorkPhoneLabel = new javax.swing.JLabel();
  44.         tabContactMobilePhoneLabel = new javax.swing.JLabel();
  45.         tabContactWorkEmailLabel = new javax.swing.JLabel();
  46.         tabContactFirstNameTextField = new javax.swing.JTextField();
  47.         tabContactLastNameTextField = new javax.swing.JTextField();
  48.         tabContactHomePhoneTextField = new javax.swing.JTextField();
  49.         tabContactWorkPhoneTextField = new javax.swing.JTextField();
  50.         tabContactMobilePhoneTextField = new javax.swing.JTextField();
  51.         tabContactPersonalEmailTextField = new javax.swing.JTextField();
  52.         tabContactWorkEmailTextField = new javax.swing.JTextField();
  53.         tabPersonal = new javax.swing.JPanel();
  54.         tabPersonalCityLabel = new javax.swing.JLabel();
  55.         tabPersonalBirthdayTextField = new javax.swing.JTextField();
  56.         tabPersonalStateProvinceLabel = new javax.swing.JLabel();
  57.         tabPersonalWebsiteTextField = new javax.swing.JTextField();
  58.         tabPersonalZIPPostalCodeLabel = new javax.swing.JLabel();
  59.         tabPersonalCountryRegionLabel = new javax.swing.JLabel();
  60.         tabPersonalWebsiteLabel = new javax.swing.JLabel();
  61.         tabPersonalStreetAddressTextField = new javax.swing.JTextField();
  62.         tabPersonalCityTextField = new javax.swing.JTextField();
  63.         tabPersonalBirthdayLabel = new javax.swing.JLabel();
  64.         tabPersonalStateProvinceTextField = new javax.swing.JTextField();
  65.         tabPersonalStreetAddressLabel = new javax.swing.JLabel();
  66.         tabPersonalCountryRegionTextField = new javax.swing.JTextField();
  67.         tabPersonalZIPPostalCodeTextField = new javax.swing.JTextField();
  68.         tabPersonalSignificantOtherLabel = new javax.swing.JLabel();
  69.         tabPersonalSignificantOtherTextField = new javax.swing.JTextField();
  70.         tabWork = new javax.swing.JPanel();
  71.         tabWorkJobTitleLabel = new javax.swing.JLabel();
  72.         tabContactPersonalEmailTextField2 = new javax.swing.JTextField();
  73.         tabWorkStreetAddressLabel = new javax.swing.JLabel();
  74.         tabContactWorkEmailTextField2 = new javax.swing.JTextField();
  75.         tabWorkCityLabel = new javax.swing.JLabel();
  76.         tabWorkStateProvinceLabel = new javax.swing.JLabel();
  77.         tabWorkCountryRegionLabel = new javax.swing.JLabel();
  78.         tabContactFirstNameTextField2 = new javax.swing.JTextField();
  79.         tabContactLastNameTextField2 = new javax.swing.JTextField();
  80.         tabWorkZipPostaCodeLabel = new javax.swing.JLabel();
  81.         tabContactHomePhoneTextField2 = new javax.swing.JTextField();
  82.         tabWorkCompanyLabel = new javax.swing.JLabel();
  83.         tabContactMobilePhoneTextField2 = new javax.swing.JTextField();
  84.         tabContactWorkPhoneTextField2 = new javax.swing.JTextField();
  85.         tabWorkWorkWebsiteLabel = new javax.swing.JLabel();
  86.         tabContactWorkEmailTextField5 = new javax.swing.JTextField();
  87.         tabNotes = new javax.swing.JPanel();
  88.         jScrollPane2 = new javax.swing.JScrollPane();
  89.         tabNotesTextField = new javax.swing.JTextArea();
  90.         jButton1 = new javax.swing.JButton();
  91.         jContactMainScreenMenuBar = new javax.swing.JMenuBar();
  92.         jContactMainScreenMenuBarFile = new javax.swing.JMenu();
  93.         jContactMainScreenMenuBarFileNew = new javax.swing.JMenuItem();
  94.         jContactMainScreenMenuBarFileSaveAll = new javax.swing.JMenuItem();
  95.         jContactMainScreenMenuBarEdit = new javax.swing.JMenu();
  96.         jContactMainScreenMenuBarEditDelete = new javax.swing.JMenuItem();
  97.  
  98.         newName.setTitle("New Contact");
  99.         newName.setMinimumSize(new java.awt.Dimension(280, 110));
  100.  
  101.         newNameMessage.setText("Name: ");
  102.  
  103.         newNameOK.setText("OK");
  104.         newNameOK.addActionListener(new java.awt.event.ActionListener() {
  105.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  106.                 newNameOKActionPerformed(evt);
  107.             }
  108.         });
  109.  
  110.         javax.swing.GroupLayout newNameLayout = new javax.swing.GroupLayout(newName.getContentPane());
  111.         newName.getContentPane().setLayout(newNameLayout);
  112.         newNameLayout.setHorizontalGroup(
  113.             newNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  114.             .addGroup(newNameLayout.createSequentialGroup()
  115.                 .addContainerGap()
  116.                 .addGroup(newNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  117.                     .addComponent(newNameOK, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
  118.                     .addGroup(newNameLayout.createSequentialGroup()
  119.                         .addComponent(newNameMessage)
  120.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  121.                         .addComponent(newNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 188, javax.swing.GroupLayout.PREFERRED_SIZE)))
  122.                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  123.         );
  124.         newNameLayout.setVerticalGroup(
  125.             newNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  126.             .addGroup(newNameLayout.createSequentialGroup()
  127.                 .addContainerGap()
  128.                 .addGroup(newNameLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  129.                     .addComponent(newNameMessage)
  130.                     .addComponent(newNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  131.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  132.                 .addComponent(newNameOK)
  133.                 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  134.         );
  135.  
  136.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  137.         setTitle("jContact");
  138.  
  139.         contactList.setModel(new javax.swing.AbstractListModel() {
  140.             String[] strings = { "Item 1", "Item 2", "Item 3", "Item 4", "Item 5" };
  141.             public int getSize() { return strings.length; }
  142.             public Object getElementAt(int i) { return strings[i]; }
  143.         });
  144.         contactList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
  145.         contactList.addMouseListener(new java.awt.event.MouseAdapter() {
  146.             public void mouseClicked(java.awt.event.MouseEvent evt) {
  147.                 contactListMouseClicked(evt);
  148.             }
  149.         });
  150.         jScrollPane1.setViewportView(contactList);
  151.  
  152.         tabContactFirstNameLabel.setText("First Name");
  153.  
  154.         tabContactPersonalEmailLabel.setText("Personal e-mail");
  155.  
  156.         tabContactLastNameLabel.setText("Last Name");
  157.  
  158.         tabContactHomePhoneLabel.setText("Home Phone");
  159.  
  160.         tabContactWorkPhoneLabel.setText("Work Phone");
  161.  
  162.         tabContactMobilePhoneLabel.setText("Mobile Phone");
  163.  
  164.         tabContactWorkEmailLabel.setText("Work Email");
  165.  
  166.         tabContactFirstNameTextField.addActionListener(new java.awt.event.ActionListener() {
  167.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  168.                 tabContactFirstNameTextFieldActionPerformed(evt);
  169.             }
  170.         });
  171.  
  172.         tabContactMobilePhoneTextField.addActionListener(new java.awt.event.ActionListener() {
  173.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  174.                 tabContactMobilePhoneTextFieldActionPerformed(evt);
  175.             }
  176.         });
  177.  
  178.         javax.swing.GroupLayout tabContactLayout = new javax.swing.GroupLayout(tabContact);
  179.         tabContact.setLayout(tabContactLayout);
  180.         tabContactLayout.setHorizontalGroup(
  181.             tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  182.             .addGroup(tabContactLayout.createSequentialGroup()
  183.                 .addContainerGap()
  184.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  185.                     .addComponent(tabContactPersonalEmailLabel)
  186.                     .addComponent(tabContactMobilePhoneLabel)
  187.                     .addComponent(tabContactWorkEmailLabel)
  188.                     .addComponent(tabContactWorkPhoneLabel)
  189.                     .addComponent(tabContactHomePhoneLabel)
  190.                     .addComponent(tabContactLastNameLabel)
  191.                     .addComponent(tabContactFirstNameLabel))
  192.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  193.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  194.                     .addComponent(tabContactFirstNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
  195.                     .addComponent(tabContactLastNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
  196.                     .addComponent(tabContactHomePhoneTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
  197.                     .addComponent(tabContactWorkPhoneTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
  198.                     .addComponent(tabContactWorkEmailTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
  199.                     .addComponent(tabContactMobilePhoneTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE)
  200.                     .addComponent(tabContactPersonalEmailTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 296, Short.MAX_VALUE))
  201.                 .addContainerGap())
  202.         );
  203.         tabContactLayout.setVerticalGroup(
  204.             tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  205.             .addGroup(tabContactLayout.createSequentialGroup()
  206.                 .addContainerGap()
  207.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  208.                     .addComponent(tabContactFirstNameLabel)
  209.                     .addComponent(tabContactFirstNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  210.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  211.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  212.                     .addComponent(tabContactLastNameLabel)
  213.                     .addComponent(tabContactLastNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  214.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  215.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  216.                     .addComponent(tabContactHomePhoneLabel)
  217.                     .addComponent(tabContactHomePhoneTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  218.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  219.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  220.                     .addComponent(tabContactWorkPhoneLabel)
  221.                     .addComponent(tabContactWorkPhoneTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  222.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  223.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  224.                     .addComponent(tabContactMobilePhoneLabel)
  225.                     .addComponent(tabContactMobilePhoneTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  226.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  227.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  228.                     .addComponent(tabContactPersonalEmailLabel)
  229.                     .addComponent(tabContactPersonalEmailTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  230.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  231.                 .addGroup(tabContactLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  232.                     .addComponent(tabContactWorkEmailTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  233.                     .addComponent(tabContactWorkEmailLabel))
  234.                 .addContainerGap(267, Short.MAX_VALUE))
  235.         );
  236.  
  237.         jTabbedPane1.addTab("Contact", tabContact);
  238.  
  239.         tabPersonalCityLabel.setText("City");
  240.  
  241.         tabPersonalStateProvinceLabel.setText("State/Province");
  242.  
  243.         tabPersonalZIPPostalCodeLabel.setText("ZIP/Postal Code");
  244.  
  245.         tabPersonalCountryRegionLabel.setText("Country/Region");
  246.  
  247.         tabPersonalWebsiteLabel.setText("Website");
  248.  
  249.         tabPersonalStreetAddressTextField.addActionListener(new java.awt.event.ActionListener() {
  250.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  251.                 tabPersonalStreetAddressTextFieldActionPerformed(evt);
  252.             }
  253.         });
  254.  
  255.         tabPersonalBirthdayLabel.setText("Birthday");
  256.  
  257.         tabPersonalStreetAddressLabel.setText("Street Address");
  258.  
  259.         tabPersonalCountryRegionTextField.addActionListener(new java.awt.event.ActionListener() {
  260.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  261.                 tabPersonalCountryRegionTextFieldActionPerformed(evt);
  262.             }
  263.         });
  264.  
  265.         tabPersonalSignificantOtherLabel.setText("Significant Other");
  266.  
  267.         javax.swing.GroupLayout tabPersonalLayout = new javax.swing.GroupLayout(tabPersonal);
  268.         tabPersonal.setLayout(tabPersonalLayout);
  269.         tabPersonalLayout.setHorizontalGroup(
  270.             tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  271.             .addGroup(tabPersonalLayout.createSequentialGroup()
  272.                 .addContainerGap()
  273.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  274.                     .addComponent(tabPersonalSignificantOtherLabel)
  275.                     .addComponent(tabPersonalBirthdayLabel)
  276.                     .addComponent(tabPersonalCountryRegionLabel)
  277.                     .addComponent(tabPersonalWebsiteLabel)
  278.                     .addComponent(tabPersonalZIPPostalCodeLabel)
  279.                     .addComponent(tabPersonalStateProvinceLabel)
  280.                     .addComponent(tabPersonalCityLabel)
  281.                     .addComponent(tabPersonalStreetAddressLabel))
  282.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  283.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  284.                     .addComponent(tabPersonalStreetAddressTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
  285.                     .addComponent(tabPersonalCityTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
  286.                     .addComponent(tabPersonalStateProvinceTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
  287.                     .addComponent(tabPersonalZIPPostalCodeTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
  288.                     .addComponent(tabPersonalCountryRegionTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
  289.                     .addComponent(tabPersonalBirthdayTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
  290.                     .addComponent(tabPersonalWebsiteTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE)
  291.                     .addComponent(tabPersonalSignificantOtherTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE))
  292.                 .addContainerGap())
  293.         );
  294.         tabPersonalLayout.setVerticalGroup(
  295.             tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  296.             .addGroup(tabPersonalLayout.createSequentialGroup()
  297.                 .addContainerGap()
  298.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  299.                     .addComponent(tabPersonalStreetAddressLabel)
  300.                     .addComponent(tabPersonalStreetAddressTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  301.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  302.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  303.                     .addComponent(tabPersonalCityLabel)
  304.                     .addComponent(tabPersonalCityTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  305.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  306.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  307.                     .addComponent(tabPersonalStateProvinceLabel)
  308.                     .addComponent(tabPersonalStateProvinceTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  309.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  310.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  311.                     .addComponent(tabPersonalZIPPostalCodeLabel)
  312.                     .addComponent(tabPersonalZIPPostalCodeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  313.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  314.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  315.                     .addComponent(tabPersonalCountryRegionLabel)
  316.                     .addComponent(tabPersonalCountryRegionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  317.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  318.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  319.                     .addComponent(tabPersonalBirthdayLabel)
  320.                     .addComponent(tabPersonalBirthdayTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  321.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  322.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  323.                     .addComponent(tabPersonalWebsiteTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  324.                     .addComponent(tabPersonalWebsiteLabel))
  325.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  326.                 .addGroup(tabPersonalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  327.                     .addComponent(tabPersonalSignificantOtherTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  328.                     .addComponent(tabPersonalSignificantOtherLabel))
  329.                 .addContainerGap(241, Short.MAX_VALUE))
  330.         );
  331.  
  332.         jTabbedPane1.addTab("Personal", tabPersonal);
  333.  
  334.         tabWorkJobTitleLabel.setText("Job Title");
  335.  
  336.         tabWorkStreetAddressLabel.setText("Street Address");
  337.  
  338.         tabWorkCityLabel.setText("City");
  339.  
  340.         tabWorkStateProvinceLabel.setText("State/Province");
  341.  
  342.         tabWorkCountryRegionLabel.setText("Country/Region");
  343.  
  344.         tabContactFirstNameTextField2.addActionListener(new java.awt.event.ActionListener() {
  345.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  346.                 tabContactFirstNameTextField2ActionPerformed(evt);
  347.             }
  348.         });
  349.  
  350.         tabWorkZipPostaCodeLabel.setText("ZIP/Postal Code");
  351.  
  352.         tabWorkCompanyLabel.setText("Company");
  353.  
  354.         tabContactMobilePhoneTextField2.addActionListener(new java.awt.event.ActionListener() {
  355.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  356.                 tabContactMobilePhoneTextField2ActionPerformed(evt);
  357.             }
  358.         });
  359.  
  360.         tabWorkWorkWebsiteLabel.setText("Work Website");
  361.  
  362.         javax.swing.GroupLayout tabWorkLayout = new javax.swing.GroupLayout(tabWork);
  363.         tabWork.setLayout(tabWorkLayout);
  364.         tabWorkLayout.setHorizontalGroup(
  365.             tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  366.             .addGroup(tabWorkLayout.createSequentialGroup()
  367.                 .addContainerGap()
  368.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  369.                     .addComponent(tabWorkWorkWebsiteLabel)
  370.                     .addComponent(tabWorkZipPostaCodeLabel)
  371.                     .addComponent(tabWorkStateProvinceLabel)
  372.                     .addComponent(tabWorkCountryRegionLabel)
  373.                     .addComponent(tabWorkCityLabel)
  374.                     .addComponent(tabWorkStreetAddressLabel)
  375.                     .addComponent(tabWorkJobTitleLabel)
  376.                     .addComponent(tabWorkCompanyLabel))
  377.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  378.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  379.                     .addComponent(tabContactFirstNameTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
  380.                     .addComponent(tabContactLastNameTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
  381.                     .addComponent(tabContactHomePhoneTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
  382.                     .addComponent(tabContactWorkPhoneTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
  383.                     .addComponent(tabContactMobilePhoneTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
  384.                     .addComponent(tabContactPersonalEmailTextField2, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
  385.                     .addComponent(tabContactWorkEmailTextField2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
  386.                     .addComponent(tabContactWorkEmailTextField5, javax.swing.GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE))
  387.                 .addContainerGap())
  388.         );
  389.         tabWorkLayout.setVerticalGroup(
  390.             tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  391.             .addGroup(tabWorkLayout.createSequentialGroup()
  392.                 .addContainerGap()
  393.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  394.                     .addComponent(tabWorkCompanyLabel)
  395.                     .addComponent(tabContactFirstNameTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  396.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  397.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  398.                     .addComponent(tabWorkJobTitleLabel)
  399.                     .addComponent(tabContactLastNameTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  400.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  401.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  402.                     .addComponent(tabWorkStreetAddressLabel)
  403.                     .addComponent(tabContactHomePhoneTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  404.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  405.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  406.                     .addComponent(tabWorkCityLabel)
  407.                     .addComponent(tabContactWorkPhoneTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  408.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  409.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  410.                     .addComponent(tabWorkStateProvinceLabel)
  411.                     .addComponent(tabContactMobilePhoneTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  412.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  413.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  414.                     .addComponent(tabWorkZipPostaCodeLabel)
  415.                     .addComponent(tabContactPersonalEmailTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  416.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  417.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  418.                     .addComponent(tabContactWorkEmailTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  419.                     .addComponent(tabWorkCountryRegionLabel))
  420.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  421.                 .addGroup(tabWorkLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  422.                     .addComponent(tabContactWorkEmailTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  423.                     .addComponent(tabWorkWorkWebsiteLabel))
  424.                 .addContainerGap(241, Short.MAX_VALUE))
  425.         );
  426.  
  427.         jTabbedPane1.addTab("Work", tabWork);
  428.  
  429.         tabNotesTextField.setColumns(20);
  430.         tabNotesTextField.setRows(5);
  431.         jScrollPane2.setViewportView(tabNotesTextField);
  432.  
  433.         jButton1.setText("Save");
  434.         jButton1.addActionListener(new java.awt.event.ActionListener() {
  435.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  436.                 jButton1ActionPerformed(evt);
  437.             }
  438.         });
  439.  
  440.         javax.swing.GroupLayout tabNotesLayout = new javax.swing.GroupLayout(tabNotes);
  441.         tabNotes.setLayout(tabNotesLayout);
  442.         tabNotesLayout.setHorizontalGroup(
  443.             tabNotesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  444.             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, tabNotesLayout.createSequentialGroup()
  445.                 .addContainerGap()
  446.                 .addGroup(tabNotesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  447.                     .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 378, Short.MAX_VALUE)
  448.                     .addComponent(jButton1))
  449.                 .addContainerGap())
  450.         );
  451.         tabNotesLayout.setVerticalGroup(
  452.             tabNotesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  453.             .addGroup(tabNotesLayout.createSequentialGroup()
  454.                 .addContainerGap()
  455.                 .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 387, javax.swing.GroupLayout.PREFERRED_SIZE)
  456.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  457.                 .addComponent(jButton1)
  458.                 .addContainerGap(27, Short.MAX_VALUE))
  459.         );
  460.  
  461.         jTabbedPane1.addTab("Notes", tabNotes);
  462.  
  463.         jContactMainScreenMenuBarFile.setText("File");
  464.  
  465.         jContactMainScreenMenuBarFileNew.setText("New");
  466.         jContactMainScreenMenuBarFileNew.addActionListener(new java.awt.event.ActionListener() {
  467.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  468.                 jContactMainScreenMenuBarFileNewActionPerformed(evt);
  469.             }
  470.         });
  471.         jContactMainScreenMenuBarFile.add(jContactMainScreenMenuBarFileNew);
  472.  
  473.         jContactMainScreenMenuBarFileSaveAll.setText("Save All");
  474.         jContactMainScreenMenuBarFile.add(jContactMainScreenMenuBarFileSaveAll);
  475.  
  476.         jContactMainScreenMenuBar.add(jContactMainScreenMenuBarFile);
  477.  
  478.         jContactMainScreenMenuBarEdit.setText("Edit");
  479.  
  480.         jContactMainScreenMenuBarEditDelete.setText("Delete");
  481.         jContactMainScreenMenuBarEditDelete.addActionListener(new java.awt.event.ActionListener() {
  482.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  483.                 jContactMainScreenMenuBarEditDeleteActionPerformed(evt);
  484.             }
  485.         });
  486.         jContactMainScreenMenuBarEdit.add(jContactMainScreenMenuBarEditDelete);
  487.  
  488.         jContactMainScreenMenuBar.add(jContactMainScreenMenuBarEdit);
  489.  
  490.         setJMenuBar(jContactMainScreenMenuBar);
  491.  
  492.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  493.         getContentPane().setLayout(layout);
  494.         layout.setHorizontalGroup(
  495.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  496.             .addGroup(layout.createSequentialGroup()
  497.                 .addContainerGap()
  498.                 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 352, javax.swing.GroupLayout.PREFERRED_SIZE)
  499.                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  500.                 .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 403, Short.MAX_VALUE)
  501.                 .addContainerGap())
  502.         );
  503.         layout.setVerticalGroup(
  504.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  505.             .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  506.                 .addContainerGap()
  507.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  508.                     .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE)
  509.                     .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 482, Short.MAX_VALUE))
  510.                 .addContainerGap())
  511.         );
  512.  
  513.         pack();
  514.     }// </editor-fold>
  515.  
  516.     private void newNameOKActionPerformed(java.awt.event.ActionEvent evt) {                                          
  517.         String currentNewName = newNameTextField.getText();
  518.         newName.setVisible(false);        // TODO add your handling code here:
  519.     }                                        
  520.  
  521.     private void contactListMouseClicked(java.awt.event.MouseEvent evt) {                                        
  522.         // TODO add your handling code here:
  523.     }                                        
  524.  
  525.     private void tabContactFirstNameTextFieldActionPerformed(java.awt.event.ActionEvent evt) {                                                            
  526.         // TODO add your handling code here:
  527.     }                                                            
  528.  
  529.     private void tabContactMobilePhoneTextFieldActionPerformed(java.awt.event.ActionEvent evt) {                                                              
  530.         // TODO add your handling code here:
  531.     }                                                              
  532.  
  533.     private void tabPersonalStreetAddressTextFieldActionPerformed(java.awt.event.ActionEvent evt) {                                                                  
  534.         // TODO add your handling code here:
  535.     }                                                                
  536.  
  537.     private void tabPersonalCountryRegionTextFieldActionPerformed(java.awt.event.ActionEvent evt) {                                                                
  538.         // TODO add your handling code here:
  539.     }                                                              
  540.  
  541.     private void tabContactFirstNameTextField2ActionPerformed(java.awt.event.ActionEvent evt) {                                                              
  542.         // TODO add your handling code here:
  543.     }                                                            
  544.  
  545.     private void tabContactMobilePhoneTextField2ActionPerformed(java.awt.event.ActionEvent evt) {                                                                
  546.         // TODO add your handling code here:
  547.     }                                                              
  548.  
  549.     private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {                                        
  550.         // TODO add your handling code here:
  551.     }                                        
  552.  
  553.     private void jContactMainScreenMenuBarEditDeleteActionPerformed(java.awt.event.ActionEvent evt) {
  554.         // TODO add your handling code here:
  555. }
  556.  
  557.     private void jContactMainScreenMenuBarFileNewActionPerformed(java.awt.event.ActionEvent evt) {
  558.         newName.setVisible(true);        // TODO add your handling code here:
  559. }
  560.  
  561.     /**
  562.      * @param args the command line arguments
  563.      */
  564.     public static void main(String args[]) {
  565.         java.awt.EventQueue.invokeLater(new Runnable() {
  566.  
  567.             public void run() {
  568.                 new jContactMainScreen().setVisible(true);
  569.             }
  570.         });
  571.     }
  572.     // Variables declaration - do not modify
  573.     private javax.swing.JList contactList;
  574.     private javax.swing.JButton jButton1;
  575.     private javax.swing.JMenuBar jContactMainScreenMenuBar;
  576.     private javax.swing.JMenu jContactMainScreenMenuBarEdit;
  577.     private javax.swing.JMenuItem jContactMainScreenMenuBarEditDelete;
  578.     private javax.swing.JMenu jContactMainScreenMenuBarFile;
  579.     private javax.swing.JMenuItem jContactMainScreenMenuBarFileNew;
  580.     private javax.swing.JMenuItem jContactMainScreenMenuBarFileSaveAll;
  581.     private javax.swing.JScrollPane jScrollPane1;
  582.     private javax.swing.JScrollPane jScrollPane2;
  583.     private javax.swing.JTabbedPane jTabbedPane1;
  584.     private javax.swing.JFrame newName;
  585.     private javax.swing.JLabel newNameMessage;
  586.     private javax.swing.JButton newNameOK;
  587.     private javax.swing.JTextField newNameTextField;
  588.     private javax.swing.JPanel tabContact;
  589.     private javax.swing.JLabel tabContactFirstNameLabel;
  590.     private javax.swing.JTextField tabContactFirstNameTextField;
  591.     private javax.swing.JTextField tabContactFirstNameTextField2;
  592.     private javax.swing.JLabel tabContactHomePhoneLabel;
  593.     private javax.swing.JTextField tabContactHomePhoneTextField;
  594.     private javax.swing.JTextField tabContactHomePhoneTextField2;
  595.     private javax.swing.JLabel tabContactLastNameLabel;
  596.     private javax.swing.JTextField tabContactLastNameTextField;
  597.     private javax.swing.JTextField tabContactLastNameTextField2;
  598.     private javax.swing.JLabel tabContactMobilePhoneLabel;
  599.     private javax.swing.JTextField tabContactMobilePhoneTextField;
  600.     private javax.swing.JTextField tabContactMobilePhoneTextField2;
  601.     private javax.swing.JLabel tabContactPersonalEmailLabel;
  602.     private javax.swing.JTextField tabContactPersonalEmailTextField;
  603.     private javax.swing.JTextField tabContactPersonalEmailTextField2;
  604.     private javax.swing.JLabel tabContactWorkEmailLabel;
  605.     private javax.swing.JTextField tabContactWorkEmailTextField;
  606.     private javax.swing.JTextField tabContactWorkEmailTextField2;
  607.     private javax.swing.JTextField tabContactWorkEmailTextField5;
  608.     private javax.swing.JLabel tabContactWorkPhoneLabel;
  609.     private javax.swing.JTextField tabContactWorkPhoneTextField;
  610.     private javax.swing.JTextField tabContactWorkPhoneTextField2;
  611.     private javax.swing.JPanel tabNotes;
  612.     private javax.swing.JTextArea tabNotesTextField;
  613.     private javax.swing.JPanel tabPersonal;
  614.     private javax.swing.JLabel tabPersonalBirthdayLabel;
  615.     private javax.swing.JTextField tabPersonalBirthdayTextField;
  616.     private javax.swing.JLabel tabPersonalCityLabel;
  617.     private javax.swing.JTextField tabPersonalCityTextField;
  618.     private javax.swing.JLabel tabPersonalCountryRegionLabel;
  619.     private javax.swing.JTextField tabPersonalCountryRegionTextField;
  620.     private javax.swing.JLabel tabPersonalSignificantOtherLabel;
  621.     private javax.swing.JTextField tabPersonalSignificantOtherTextField;
  622.     private javax.swing.JLabel tabPersonalStateProvinceLabel;
  623.     private javax.swing.JTextField tabPersonalStateProvinceTextField;
  624.     private javax.swing.JLabel tabPersonalStreetAddressLabel;
  625.     private javax.swing.JTextField tabPersonalStreetAddressTextField;
  626.     private javax.swing.JLabel tabPersonalWebsiteLabel;
  627.     private javax.swing.JTextField tabPersonalWebsiteTextField;
  628.     private javax.swing.JLabel tabPersonalZIPPostalCodeLabel;
  629.     private javax.swing.JTextField tabPersonalZIPPostalCodeTextField;
  630.     private javax.swing.JPanel tabWork;
  631.     private javax.swing.JLabel tabWorkCityLabel;
  632.     private javax.swing.JLabel tabWorkCompanyLabel;
  633.     private javax.swing.JLabel tabWorkCountryRegionLabel;
  634.     private javax.swing.JLabel tabWorkJobTitleLabel;
  635.     private javax.swing.JLabel tabWorkStateProvinceLabel;
  636.     private javax.swing.JLabel tabWorkStreetAddressLabel;
  637.     private javax.swing.JLabel tabWorkWorkWebsiteLabel;
  638.     private javax.swing.JLabel tabWorkZipPostaCodeLabel;
  639.     // End of variables declaration
  640. }